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:
java.io.Closeable,java.lang.AutoCloseable
public class UnixSocketTransport extends AbstractUnixTransport
Transport type representing a transport connection to a unix socket.- Since:
- v3.2.0 - 2019-02-08
-
-
Field Summary
Fields Modifier and Type Field Description private jnr.unixsocket.UnixServerSocketChannelserverSocketprivate jnr.unixsocket.UnixSocketChannelsocketprivate jnr.unixsocket.UnixSocketAddressunixSocketAddress
-
Constructor Summary
Constructors Constructor Description UnixSocketTransport(JnrUnixBusAddress _address, TransportConfig _config)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()java.nio.channels.SocketChannelconnectImpl()Establish a connection to DBus using unix sockets.intgetUid(java.nio.channels.SocketChannel _sock)protected booleanhasFileDescriptorSupport()Method to indicate if passing of file descriptors is allowed.protected booleanisAbstractAllowed()Deprecated.-
Methods inherited from class org.freedesktop.dbus.connections.transports.AbstractTransport
connect, getAddress, getLogger, getSaslAuthMode, getSaslConfig, getSaslMode, isConnected, listen, readMessage, setPreConnectCallback, setSaslAuthMode, setSaslMode, toString, writeMessage
-
-
-
-
Constructor Detail
-
UnixSocketTransport
UnixSocketTransport(JnrUnixBusAddress _address, TransportConfig _config) throws TransportConfigurationException
- Throws:
TransportConfigurationException
-
-
Method Detail
-
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
public java.nio.channels.SocketChannel connectImpl() throws java.io.IOExceptionEstablish a connection to DBus using unix sockets.- Specified by:
connectImplin classAbstractTransport- Throws:
java.io.IOException- on error
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classAbstractTransport- Throws:
java.io.IOException
-
isAbstractAllowed
@Deprecated protected boolean 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
public int getUid(java.nio.channels.SocketChannel _sock) throws java.io.IOException- Specified by:
getUidin classAbstractUnixTransport- Throws:
java.io.IOException
-
-