Class TcpTransport
java.lang.Object
org.freedesktop.dbus.connections.transports.AbstractTransport
org.freedesktop.dbus.transport.tcp.TcpTransport
- All Implemented Interfaces:
Closeable, AutoCloseable
Transport type representing a transport connection to TCP.
- Since:
- v3.2.0 - 2019-02-08
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ServerSocketChannelprivate SocketChannelprivate final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Connect to DBus using TCP.Returns theBusAddressused for this transport.protected booleanMethod to indicate if passing of file descriptors is allowed.protected booleanDeprecated.Methods inherited from class AbstractTransport
connect, getLogger, getSaslAuthMode, getSaslConfig, getSaslMode, isConnected, listen, readMessage, setPreConnectCallback, setSaslAuthMode, setSaslMode, toString, writeMessage
-
Field Details
-
timeout
private final int timeout -
socket
-
serverSocket
-
-
Constructor Details
-
TcpTransport
TcpTransport(BusAddress _address, int _timeout, TransportConfig _config)
-
-
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
-
getAddress
Description copied from class:AbstractTransportReturns theBusAddressused for this transport.- Overrides:
getAddressin classAbstractTransport- Returns:
- BusAddress, never null
-
connectImpl
Connect to DBus using TCP.- 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
-