org.newsclub.net.unix
Class AFUNIXSocket

java.lang.Object
  extended by java.net.Socket
      extended by org.newsclub.net.unix.AFUNIXSocket

public class AFUNIXSocket
extends java.net.Socket

Implementation of an AF_UNIX domain socket.

Author:
Christian Kohlsch??tter

Field Summary
protected  org.newsclub.net.unix.AFUNIXSocketImpl impl
           
 
Method Summary
 void bind(java.net.SocketAddress bindpoint)
          Binds this AFUNIXSocket to the given bindpoint.
 void connect(java.net.SocketAddress endpoint)
          
 void connect(java.net.SocketAddress endpoint, int timeout)
           
static AFUNIXSocket connectTo(AFUNIXSocketAddress addr)
          Creates a new AFUNIXSocket and connects it to the given AFUNIXSocketAddress.
static boolean isSupported()
          Returns true iff AFUNIXSockets are supported by the current Java VM.
static AFUNIXSocket newInstance()
          Creates a new, unbound AFUNIXSocket.
 java.lang.String toString()
           
 
Methods inherited from class java.net.Socket
close, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, 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, shutdownInput, shutdownOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

impl

protected org.newsclub.net.unix.AFUNIXSocketImpl impl
Method Detail

newInstance

public static AFUNIXSocket newInstance()
                                throws java.io.IOException
Creates a new, unbound AFUNIXSocket.

Returns:
Throws:
java.io.IOException

connectTo

public static AFUNIXSocket connectTo(AFUNIXSocketAddress addr)
                              throws java.io.IOException
Creates a new AFUNIXSocket and connects it to the given AFUNIXSocketAddress.

Parameters:
addr -
Returns:
Throws:
java.io.IOException

bind

public void bind(java.net.SocketAddress bindpoint)
          throws java.io.IOException
Binds this AFUNIXSocket to the given bindpoint. Only bindpoints of the type AFUNIXSocketAddress are supported.

Overrides:
bind in class java.net.Socket
Throws:
java.io.IOException

connect

public void connect(java.net.SocketAddress endpoint)
             throws java.io.IOException

Overrides:
connect in class java.net.Socket
Throws:
java.io.IOException

connect

public void connect(java.net.SocketAddress endpoint,
                    int timeout)
             throws java.io.IOException
Overrides:
connect in class java.net.Socket
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.net.Socket

isSupported

public static boolean isSupported()
Returns true iff AFUNIXSockets are supported by the current Java VM. To support AFUNIXSockets, a custom JNI library must be loaded that is supplied with junixsocket.

Returns: