org.newsclub.net.unix
Class AFUNIXSocketAddress
java.lang.Object
java.net.SocketAddress
java.net.InetSocketAddress
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
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 |
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
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