DatagramSocket implementation that works with AF_UNIX Unix domain sockets.
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | clearReceivedFileDescriptors()
Implements org. Clears the queue of incoming |
| public AFUNIXDatagramChannel | getChannel()
Overrides org. Returns the unique |
| public AFUNIXSocketCredentials | getPeerCredentials()
Implements org. Retrieves the "peer credentials" for this connection. |
| public FileDescriptor[] | getReceivedFileDescriptors()
Implements org. Retrieves an array of incoming Note Another call to this method will not return the same file descriptors again (most likely, an empty array will be returned). |
| public boolean | hasOutboundFileDescriptors()
Implements org. Returns |
| protected AFUNIXDatagramChannel | newChannel()
Implements abstract org. Creates a new |
| protected AFDatagramSocket | newDatagramSocketInstance()
Implements abstract org. Returns a new |
| public static AFUNIXDatagramSocket | |
| public static AFUNIXDatagramSocket | Returns: The new instance.The socket type. socketType)Returns a new |
| pack-priv static AFUNIXDatagramSocket | |
| public void | setOutboundFileDescriptors(FileDescriptor...
The file descriptors, or fdescs)null if none.Implements org. Sets a list of |
| AFUNIXDatagramSocket | back to summary |
|---|---|
| pack-priv AFUNIXDatagramSocket(final FileDescriptor fd) throws IOException | |
| AFUNIXDatagramSocket | back to summary |
|---|---|
| private AFUNIXDatagramSocket(final FileDescriptor fd, AFSocketType socketType) throws IOException | |
| clearReceivedFileDescriptors | back to summary |
|---|---|
| public void clearReceivedFileDescriptors() Implements org. Doc from org. Clears the queue of incoming
| |
| getChannel | back to summary |
|---|---|
| public AFUNIXDatagramChannel getChannel() Overrides org. Doc from java. Returns the unique A datagram socket will have a channel if, and only if, the channel
itself was created via the
| |
| getPeerCredentials | back to summary |
|---|---|
| public AFUNIXSocketCredentials getPeerCredentials() throws IOException Implements org. Doc from org. Retrieves the "peer credentials" for this connection.
These credentials may be useful to authenticate the other end of the socket (client or server).
Depending on the socket/connection/environment, you may not receive any or all credentials. For
example, on Linux,
| |
| getReceivedFileDescriptors | back to summary |
|---|---|
| public FileDescriptor[] getReceivedFileDescriptors() throws IOException Implements org. Doc from org. Retrieves an array of incoming Note Another call to this method will not return the same file descriptors again (most likely, an empty array will be returned).
| |
| hasOutboundFileDescriptors | back to summary |
|---|---|
| public boolean hasOutboundFileDescriptors() Implements org. Doc from org. Returns
| |
| newChannel | back to summary |
|---|---|
| protected AFUNIXDatagramChannel newChannel() Implements abstract org. Doc from org. Creates a new
| |
| newDatagramSocketInstance | back to summary |
|---|---|
| protected AFDatagramSocket Implements abstract org. Doc from org. Returns a new
| |
| newInstance | back to summary |
|---|---|
| public static AFUNIXDatagramSocket newInstance() throws IOException Returns a new
| |
| newInstance | back to summary |
|---|---|
| public static AFUNIXDatagramSocket newInstance(AFSocketType socketType) throws IOException Returns a new
| |
| newInstance | back to summary |
|---|---|
| pack-priv static AFUNIXDatagramSocket newInstance(FileDescriptor fdObj, int localPort, int remotePort) throws IOException | |
| setOutboundFileDescriptors | back to summary |
|---|---|
| public void setOutboundFileDescriptors(FileDescriptor... fdescs) throws IOException Implements org. Doc from org. Sets a list of Important Note There can only be one set of file descriptors active until the write completes. The socket also needs to be connected for this operation to succeed. It is also important to know that there may be an upper limit imposed by the operation system as to how many file descriptors can be sent at once. Linux, for example, may support up to 253. If the number of file descriptors exceeds the limit, an exception may be thrown when sending data along with the ancillary message containing the file descriptors.
| |