Class NGUnixDomainSocket

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class NGUnixDomainSocket
    extends java.net.Socket
    Implements a Socket backed by a native Unix domain socket. Instances of this class always return null for Socket.getInetAddress(), Socket.getLocalAddress(), Socket.getLocalSocketAddress(), Socket.getRemoteSocketAddress().
    • Constructor Summary

      Constructors 
      Constructor Description
      NGUnixDomainSocket​(int fd)
      Creates a Unix domain socket backed by a native file descriptor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      private void doShutdown​(int how)  
      java.io.InputStream getInputStream()  
      java.io.OutputStream getOutputStream()  
      void shutdownInput()  
      void shutdownOutput()  
      • Methods inherited from class java.net.Socket

        bind, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NGUnixDomainSocket

        public NGUnixDomainSocket​(int fd)
        Creates a Unix domain socket backed by a native file descriptor.
    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
        Overrides:
        getInputStream in class java.net.Socket
      • getOutputStream

        public java.io.OutputStream getOutputStream()
        Overrides:
        getOutputStream in class java.net.Socket
      • shutdownInput

        public void shutdownInput()
                           throws java.io.IOException
        Overrides:
        shutdownInput in class java.net.Socket
        Throws:
        java.io.IOException
      • shutdownOutput

        public void shutdownOutput()
                            throws java.io.IOException
        Overrides:
        shutdownOutput in class java.net.Socket
        Throws:
        java.io.IOException
      • doShutdown

        private void doShutdown​(int how)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.net.Socket
        Throws:
        java.io.IOException