org.newsclub.net.unix
Class AFUNIXSocketAddress

java.lang.Object
  extended by java.net.SocketAddress
      extended by java.net.InetSocketAddress
          extended by org.newsclub.net.unix.AFUNIXSocketAddress
All Implemented Interfaces:
java.io.Serializable

public class AFUNIXSocketAddress
extends java.net.InetSocketAddress

Describes an InetSocketAddress that actually uses AF_UNIX sockets instead of AF_INET. The ability to specify a port number is not specified by AF_UNIX sockets, but we need it sometimes, for example for RMI-over-AF_UNIX.

Author:
Christian Kohlsch??tter
See Also:
Serialized Form

Constructor Summary
AFUNIXSocketAddress(java.io.File socketFile)
          Creates a new AFUNIXSocketAddress that points to the AF_UNIX socket specified by the given file.
AFUNIXSocketAddress(java.io.File socketFile, int port)
          Creates a new AFUNIXSocketAddress that points to the AF_UNIX socket specified by the given file, assigning the given port to it.
 
Method Summary
 java.lang.String getSocketFile()
          Returns the (canonical) file path for this AFUNIXSocketAddress.
 java.lang.String toString()
           
 
Methods inherited from class java.net.InetSocketAddress
createUnresolved, equals, getAddress, getHostName, getPort, hashCode, isUnresolved
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AFUNIXSocketAddress

public AFUNIXSocketAddress(java.io.File socketFile)
                    throws java.io.IOException
Creates a new AFUNIXSocketAddress that points to the AF_UNIX socket specified by the given file.

Parameters:
socketFile -
Throws:
java.io.IOException

AFUNIXSocketAddress

public AFUNIXSocketAddress(java.io.File socketFile,
                           int port)
                    throws java.io.IOException
Creates a new AFUNIXSocketAddress that points to the AF_UNIX socket specified by the given file, assigning the given port to it.

Parameters:
socketFile -
port -
Throws:
java.io.IOException
Method Detail

getSocketFile

public java.lang.String getSocketFile()
Returns the (canonical) file path for this AFUNIXSocketAddress.

Returns:

toString

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