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.
| Modifier and Type | Field and Description |
|---|---|
| private static final Charset | |
| pack-priv static final AFAddressFamily | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| private | AFUNIXSocketAddress(int port, final byte[] socketAddress, ObjectPool.
|
| public | AFUNIXSocketAddress(File
The socket to connect to. socketFile)
Deprecated
Use
of(File) instead.
Returns an |
| public | AFUNIXSocketAddress(File
The socket to connect to. socketFile, int The port associated with this socket, or port)0 when no port should be assigned.
Deprecated
Use
of(File, int) instead.
Returns an |
| Modifier and Type | Method and Description |
|---|---|
| public static Charset | Returns: The charset.Returns the |
| public static AFAddressFamily | |
| public File | getFile()
Implements abstract org. Returns the |
| public String | Returns: The path.Returns the path to the UNIX domain socket, as a human-readable string using the default encoding. |
| public byte[] | |
| public boolean | hasFilename()
Implements abstract org. Checks if the address can be resolved to a |
| public static AFUNIXSocketAddress | Returns: The address.The identifier in the abstract namespace, without trailing zero or @. name)Convenience method to create an |
| public static AFUNIXSocketAddress | Returns: The address.The identifier in the abstract namespace, without trailing zero or @. name, int The port associated with this socket, or port)0 when no port should be assigned.Convenience method to create an |
| public boolean | Returns: true if the address is in the abstract namespace.Checks if the address is in the abstract namespace (or, for Haiku OS, in the internal namespace). |
| public static boolean | Returns: true if so.The instance to check. addr)Checks if an |
| public static boolean | Returns: true if so.The instance to check. addr)Checks if a |
| pack-priv static AFUNIXSocketAddress | newAFSocketAddress(int port, final byte[] socketAddress, ObjectPool.
|
| public AFUNIXServerSocket | newBoundServerSocket()
Overrides org. Creates a new server socket bound to this address. |
| public AFUNIXSocket | newConnectedSocket()
Overrides org. Creates a new socket connected to this address. |
| public AFUNIXServerSocket | newForceBoundServerSocket()
Overrides org. Creates a new server socket force-bound to this address (i.e., any additional call to
|
| pack-priv static File | |
| public static AFUNIXSocketAddress | Returns: A correspondingAFUNIXSocketAddress instance.The socket to connect to. socketFile)Returns an |
| public static AFUNIXSocketAddress | Returns: A correspondingAFUNIXSocketAddress instance.The socket to connect to. socketFile, int The port associated with this socket, or port)0 when no port should be assigned.Returns an |
| public static AFUNIXSocketAddress | Returns: A correspondingAFUNIXSocketAddress instance.The socket address (as bytes). socketAddress)Returns an |
| public static AFUNIXSocketAddress | Returns: A correspondingAFUNIXSocketAddress instance.The socket address (as bytes). socketAddress, int The port associated with this socket, or port)0 when no port should be assigned.Returns an |
| public static AFUNIXSocketAddress | Returns: A correspondingAFUNIXSocketAddress instance.The socket to connect to. socketPath)Returns an |
| public static AFUNIXSocketAddress | Returns: A correspondingAFUNIXSocketAddress instance.The socket to connect to. socketPath, int The port associated with this socket, or port)0 when no port should be assigned.Returns an |
| public static AFUNIXSocketAddress | Returns: The address.The URI. u)Hides org. Returns an |
| public static AFUNIXSocketAddress | Returns: The address.The URI. u, int The port to forcibly use, or overridePort)-1 for "don't override".Hides org. Returns an |
| public static AFUNIXSocketAddress | Returns: A correspondingAFUNIXSocketAddress instance.The address to convert. address)Returns an |
| public static AFUNIXSocketAddress | Returns: A correspondingAFUNIXSocketAddress instance.Returns an |
| public static AFUNIXSocketAddress | Returns: A correspondingAFUNIXSocketAddress instance.The port associated with this socket, or port)0 when no port should be assigned.Returns an |
| private static String | |
| pack-priv static AFSupplier | Returns: The supplier, ornull.The address. addr)Checks if the given address can be unwrapped to an |
| public String | toString()
Overrides java. Constructs a string representation of this InetSocketAddress. |
| public URI | toURI(String
The target scheme. scheme, URI An optional template to reuse certain parameters (e.g., the "path" component
for an template)http request), or null.Overrides org. Tries to create a URI based on this |
| public static AFUNIXSocketAddress | Returns: TheAFUNIXSocketAddress instance.The "special" address, int InetAddress.The port (use 0 for "none"). port)Returns an |
| public static AFUNIXSocketAddress | Returns: TheAFUNIXSocketAddress instance.The address to unwrap. address)Returns an |
| public static AFUNIXSocketAddress | Returns: TheAFUNIXSocketAddress instance.The "special" hostname, as provided by hostname, int InetAddress#getHostName().The port (use 0 for "none"). port)Returns an |
| ADDRESS_CHARSET | back to summary |
|---|---|
| private static final Charset ADDRESS_CHARSET | |
| AF_UNIX | back to summary |
|---|---|
pack-priv static final AFAddressFamily<@NonNull AFUNIXSocketAddress> AF_UNIX
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. | |
| AFUNIXSocketAddress | back to summary |
|---|---|
| private AFUNIXSocketAddress(int port, final byte[] socketAddress, ObjectPool. | |
| AFUNIXSocketAddress | back to summary |
|---|---|
| public AFUNIXSocketAddress(File socketFile) throws SocketException
Deprecated Use Returns an
| |
| AFUNIXSocketAddress | back to summary |
|---|---|
| public AFUNIXSocketAddress(File socketFile, int port) throws SocketException
Deprecated Use Returns an
| |
| addressCharset | back to summary |
|---|---|
| public static Charset addressCharset() Returns the
| |
| addressFamily | back to summary |
|---|---|
| public static AFAddressFamily Returns the corresponding
| |
| getFile | back to summary |
|---|---|
| public File getFile() throws FileNotFoundException Implements abstract org. Doc from org. Returns the
| |
| getPath | back to summary |
|---|---|
| public String getPath() Returns the path to the UNIX domain socket, as a human-readable string using the default encoding. For addresses in the abstract namespace, the US_ASCII encoding is used; zero-bytes are converted to '@', other non-printable bytes are converted to '.'
| |
| getPathAsBytes | back to summary |
|---|---|
| public byte[] getPathAsBytes() Returns the path to the UNIX domain socket, as bytes.
| |
| hasFilename | back to summary |
|---|---|
| public boolean hasFilename() Implements abstract org. Doc from org. Checks if the address can be resolved to a
| |
| inAbstractNamespace | back to summary |
|---|---|
| public static AFUNIXSocketAddress inAbstractNamespace(String name) throws SocketException Convenience method to create an
| |
| inAbstractNamespace | back to summary |
|---|---|
| public static AFUNIXSocketAddress inAbstractNamespace(String name, int port) throws SocketException Convenience method to create an
| |
| isInAbstractNamespace | back to summary |
|---|---|
| public boolean isInAbstractNamespace() Checks if the address is in the abstract namespace (or, for Haiku OS, in the internal namespace).
| |
| isSupportedAddress | back to summary |
|---|---|
| public static boolean isSupportedAddress(InetAddress addr) Checks if an
| |
| isSupportedAddress | back to summary |
|---|---|
| public static boolean isSupportedAddress(SocketAddress addr) Checks if a
| |
| newAFSocketAddress | back to summary |
|---|---|
| pack-priv static AFUNIXSocketAddress newAFSocketAddress(int port, final byte[] socketAddress, ObjectPool. | |
| newBoundServerSocket | back to summary |
|---|---|
| public AFUNIXServerSocket newBoundServerSocket() throws IOException Overrides org. Doc from org. Creates a new server socket bound to this address.
| |
| newConnectedSocket | back to summary |
|---|---|
| public AFUNIXSocket newConnectedSocket() throws IOException Overrides org. Doc from org. Creates a new socket connected to this address.
| |
| newForceBoundServerSocket | back to summary |
|---|---|
| public AFUNIXServerSocket newForceBoundServerSocket() throws IOException Overrides org. Doc from org. Creates a new server socket force-bound to this address (i.e., any additional call to
| |
| newTempPath | back to summary |
|---|---|
| pack-priv static File newTempPath(boolean deleteOnExit) throws IOException | |
| of | back to summary |
|---|---|
| public static AFUNIXSocketAddress of(final File socketFile) throws SocketException Returns an
| |
| of | back to summary |
|---|---|
| public static AFUNIXSocketAddress of(final File socketFile, int port) throws SocketException Returns an
| |
| of | back to summary |
|---|---|
| public static AFUNIXSocketAddress of(final byte[] socketAddress) throws SocketException Returns an Note By specifying a byte array that starts with a zero byte, you indicate that the abstract namespace is to be used. This feature is not available on all target platforms.
| |
| of | back to summary |
|---|---|
| public static AFUNIXSocketAddress of(final byte[] socketAddress, int port) throws SocketException Returns an Note By specifying a byte array that starts with a zero byte, you indicate that the abstract namespace is to be used. This feature is not available on all target platforms.
| |
| of | back to summary |
|---|---|
| public static AFUNIXSocketAddress of(Path socketPath) throws SocketException Returns an
| |
| of | back to summary |
|---|---|
| public static AFUNIXSocketAddress of(Path socketPath, int port) throws SocketException Returns an
| |
| of | back to summary |
|---|---|
| public static AFUNIXSocketAddress of(URI u) throws SocketException Hides org. Returns an
| |
| of | back to summary |
|---|---|
| public static AFUNIXSocketAddress of(URI u, int overridePort) throws SocketException Hides org. Returns an
| |
| of | back to summary |
|---|---|
| public static AFUNIXSocketAddress of(SocketAddress address) throws IOException Returns an
| |
| ofNewTempFile | back to summary |
|---|---|
| public static AFUNIXSocketAddress ofNewTempFile() throws IOException Returns an
| |
| ofNewTempPath | back to summary |
|---|---|
| public static AFUNIXSocketAddress ofNewTempPath(int port) throws IOException Returns an
| |
| prettyPrint | back to summary |
|---|---|
| private static String prettyPrint(byte[] data) | |
| supportedAddressSupplier | back to summary |
|---|---|
| pack-priv static AFSupplier Checks if the given address can be unwrapped to an
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Constructs a string representation of this InetSocketAddress.
This string is constructed by calling
If the address is an IPv6 address, the IPv6 literal is enclosed in
square brackets, for example:
To retrieve a string representation of the hostname or the address, use
| |
| toURI | back to summary |
|---|---|
| public URI toURI(String scheme, URI template) throws IOException Overrides org. Doc from org. Tries to create a URI based on this
| |
| unwrap | back to summary |
|---|---|
| public static AFUNIXSocketAddress unwrap(InetAddress address, int port) throws SocketException Returns an
| |
| unwrap | back to summary |
|---|---|
| public static AFUNIXSocketAddress unwrap(SocketAddress address) throws SocketException Returns an
| |
| unwrap | back to summary |
|---|---|
| public static AFUNIXSocketAddress unwrap(String hostname, int port) throws SocketException Returns an
| |