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()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
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
-