Note
The functionality of the native unix sockets in Java are
limited. 'Side-channel' communication (e.g. passing file descriptors)
is not possible (unlike using jnr-unix socket + dbus-java-nativefd).
Also using 'abstract' sockets is not possible when using this native implementation.
In most cases this implementation should suit our needs.
If it does not fit for you, use jnr-unixsocket instead.
| Modifier and Type | Field and Description |
|---|---|
| private ServerSocketChannel | |
| private SocketChannel | |
| private final UnixDomainSocketAddress |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public SocketChannel | acceptImpl()
Implements abstract org. Method to accept new incoming listening connections. |
| protected void | bindImpl()
Implements abstract org. Method called to prepare listening for connections. |
| protected void | closeTransport()
Implements abstract org. Method which is called to close a transport. |
| public SocketChannel | connectImpl()
Implements abstract org. Establish a connection to DBus using unix sockets. |
| public int | getUid(SocketChannel _sock)
Implements abstract org.
|
| protected boolean | hasFileDescriptorSupport()
Implements abstract org. Method to indicate if passing of file descriptors is allowed. |
| protected boolean | isBound()
Implements abstract org. Status of the server socket if this transport is configured to be a server connection. |
| serverSocket | back to summary |
|---|---|
| private ServerSocketChannel serverSocket | |
| socket | back to summary |
|---|---|
| private SocketChannel socket | |
| unixSocketAddress | back to summary |
|---|---|
| private final UnixDomainSocketAddress unixSocketAddress | |
| NativeUnixSocketTransport | back to summary |
|---|---|
| pack-priv NativeUnixSocketTransport(UnixBusAddress _address, TransportConfig _config) throws TransportConfigurationException | |
| acceptImpl | back to summary |
|---|---|
| public SocketChannel acceptImpl() throws IOException Implements abstract org. Doc from org. Method to accept new incoming listening connections.
| |
| bindImpl | back to summary |
|---|---|
| protected void bindImpl() throws IOException Implements abstract org. Doc from org. Method called to prepare listening for connections.
| |
| closeTransport | back to summary |
|---|---|
| protected void closeTransport() throws IOException Implements abstract org. Doc from org. Method which is called to close a transport.
| |
| connectImpl | back to summary |
|---|---|
| public SocketChannel connectImpl() throws IOException Implements abstract org. Establish a connection to DBus using unix sockets.
| |
| getUid | back to summary |
|---|---|
| public int getUid(SocketChannel _sock) throws IOException Implements abstract org.
| |
| hasFileDescriptorSupport | back to summary |
|---|---|
| protected boolean hasFileDescriptorSupport() Implements abstract org. Doc from org. Method to indicate if passing of file descriptors is allowed.
| |
| isBound | back to summary |
|---|---|
| protected boolean isBound() Implements abstract org. Doc from org. Status of the server socket if this transport is configured to be a server connection.
| |