Class UnixDomainSocketAddress
java.lang.Object
java.net.SocketAddress
java.net.UnixDomainSocketAddress
- All Implemented Interfaces:
Serializable
A Unix domain socket address.
A Unix domain socket address encapsulates a file-system path that Unix domain sockets
bind or connect to.
An unnamed UnixDomainSocketAddress has
an empty path. The local address of a SocketChannel to a Unix domain socket
that is automatically or implicitly bound will be unnamed.
Path objects used to create instances of this class must be obtained
from the system-default file system.
- Since:
- 16
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares this address with another object.getPath()Returns this address's path.inthashCode()Returns the hash code of thisUnixDomainSocketAddressstatic UnixDomainSocketAddressCreates a UnixDomainSocketAddress from the given path string.static UnixDomainSocketAddressCreates a UnixDomainSocketAddress for the given path.toString()Returns a string representation of thisUnixDomainSocketAddress.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class<?> getClass()Returns the runtime class of thisObject.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Method Details
-
of
Creates a UnixDomainSocketAddress from the given path string.- Parameters:
pathname- The path string, which can be empty- Returns:
- A UnixDomainSocketAddress
- Throws:
InvalidPathException- If the path cannot be converted to a PathNullPointerException- if pathname isnull
-
of
Creates a UnixDomainSocketAddress for the given path.- Parameters:
path- The path to the socket, which can be empty- Returns:
- A UnixDomainSocketAddress
- Throws:
IllegalArgumentException- If the path is not associated with the default file systemNullPointerException- if path isnull
-
getPath
-
hashCode
-
equals
-
toString
-