Class NamedPipeSocket

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

    public class NamedPipeSocket
    extends java.net.Socket
    Windows named pipe socket implementation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.RandomAccessFile file  
      private java.lang.String host  
      private java.io.InputStream is  
      private java.lang.String name  
      private java.io.OutputStream os  
    • Constructor Summary

      Constructors 
      Constructor Description
      NamedPipeSocket​(java.lang.String host, java.lang.String name)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void connect​(java.net.SocketAddress endpoint, int timeout)
      Name pipe connection.
      java.io.InputStream getInputStream()  
      java.io.OutputStream getOutputStream()  
      void setKeepAlive​(boolean bool)  
      void setSoLinger​(boolean bool, int value)  
      void setSoTimeout​(int timeout)  
      void setTcpNoDelay​(boolean bool)  
      void shutdownOutput()  
      • Methods inherited from class java.net.Socket

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

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

      • host

        private final java.lang.String host
      • name

        private final java.lang.String name
      • file

        private java.io.RandomAccessFile file
      • is

        private java.io.InputStream is
      • os

        private java.io.OutputStream os
    • Constructor Detail

      • NamedPipeSocket

        public NamedPipeSocket​(java.lang.String host,
                               java.lang.String name)
        Constructor
        Parameters:
        host - host
        name - pipe name
    • Method Detail

      • 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
      • connect

        public void connect​(java.net.SocketAddress endpoint,
                            int timeout)
                     throws java.io.IOException
        Name pipe connection.
        Overrides:
        connect in class java.net.Socket
        Parameters:
        endpoint - endPoint
        timeout - timeout in milliseconds
        Throws:
        java.io.IOException - exception
      • 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
      • setTcpNoDelay

        public void setTcpNoDelay​(boolean bool)
        Overrides:
        setTcpNoDelay in class java.net.Socket
      • setKeepAlive

        public void setKeepAlive​(boolean bool)
        Overrides:
        setKeepAlive in class java.net.Socket
      • setSoLinger

        public void setSoLinger​(boolean bool,
                                int value)
        Overrides:
        setSoLinger in class java.net.Socket
      • setSoTimeout

        public void setSoTimeout​(int timeout)
        Overrides:
        setSoTimeout in class java.net.Socket
      • shutdownOutput

        public void shutdownOutput()
        Overrides:
        shutdownOutput in class java.net.Socket