Class UnixSocketTransport
java.lang.Object
org.freedesktop.dbus.connections.transports.AbstractTransport
org.freedesktop.dbus.connections.transports.AbstractUnixTransport
org.freedesktop.dbus.transport.jnr.UnixSocketTransport
- All Implemented Interfaces:
Closeable,AutoCloseable
Transport type representing a transport connection to a unix socket.
- Since:
- v3.2.0 - 2019-02-08
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate jnr.unixsocket.UnixServerSocketChannelprivate jnr.unixsocket.UnixSocketChannelprivate final jnr.unixsocket.UnixSocketAddress -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Establish a connection to DBus using unix sockets.intgetUid(SocketChannel _sock) protected booleanMethod to indicate if passing of file descriptors is allowed.protected booleanDeprecated.Methods inherited from class org.freedesktop.dbus.connections.transports.AbstractTransport
connect, getAddress, getLogger, getSaslAuthMode, getSaslConfig, getSaslMode, isConnected, listen, readMessage, setPreConnectCallback, setSaslAuthMode, setSaslMode, toString, writeMessage
-
Field Details
-
unixSocketAddress
private final jnr.unixsocket.UnixSocketAddress unixSocketAddress -
socket
private jnr.unixsocket.UnixSocketChannel socket -
serverSocket
private jnr.unixsocket.UnixServerSocketChannel serverSocket
-
-
Constructor Details
-
UnixSocketTransport
UnixSocketTransport(JnrUnixBusAddress _address, TransportConfig _config) throws TransportConfigurationException - Throws:
TransportConfigurationException
-
-
Method Details
-
hasFileDescriptorSupport
protected boolean hasFileDescriptorSupport()Description copied from class:AbstractTransportMethod to indicate if passing of file descriptors is allowed.- Specified by:
hasFileDescriptorSupportin classAbstractTransport- Returns:
- true to allow FD passing, false otherwise
-
connectImpl
Establish a connection to DBus using unix sockets.- Specified by:
connectImplin classAbstractTransport- Throws:
IOException- on error
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractTransport- Throws:
IOException
-
isAbstractAllowed
Deprecated.Description copied from class:AbstractTransportReturn true if the transport supports 'abstract' sockets.- Specified by:
isAbstractAllowedin classAbstractTransport- Returns:
- true if abstract sockets supported, false otherwise
-
getUid
- Specified by:
getUidin classAbstractUnixTransport- Throws:
IOException
-