| Modifier and Type | Field and Description |
|---|---|
| private final BusAddress | |
| private final TransportConfig | |
| private boolean | |
| private final Logger | |
| private final MessageFactory | |
| private final ServiceLoader | |
| private static final AtomicLong | |
| private TransportConnection | |
| private final long |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract SocketChannel | Returns: newly connected client socketMethod to accept new incoming listening connections. |
| private void | |
| protected abstract void | |
| public final void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| protected abstract void | |
| public final SocketChannel | |
| protected abstract SocketChannel | Returns: socket channel connected to DBus serverAbstract method implemented by concrete sub classes to establish a connection. |
| private TransportConnection | Returns: TransportConnection with configured socket channel, reader and writersocket to use _socket)Setup message reader/writer. |
| protected BusAddress | |
| protected Logger | |
| public MessageFactory | |
| protected SaslConfig | Returns: SaslConfig, never nullReturns the current configuration used for SASL authentication. |
| public TransportConfig | |
| public TransportConnection | Returns: TransportConnection, null if not connected yetReturns the current transport connection. |
| protected abstract boolean | Returns: true to allow FD passing, false otherwiseMethod to indicate if passing of file descriptors is allowed. |
| private TransportConnection | Returns: TransportConnectionlisten or connect call which will return a socket channel _channelProvider)Method used internally to do the actual connect. |
| protected abstract boolean | Returns: booleanStatus of the server socket if this transport is configured to be a server connection. |
| public synchronized boolean | |
| public boolean | |
| public final boolean | |
| public final TransportConnection | |
| public Message | |
| private void | |
| public void | setPreConnectCallback(Consumer<AbstractTransport>
runnable to execute, null if no callback should be executed _run)Set a callback which will be called right before the connection will be established to the transport. |
| public String | |
| public void |
| address | back to summary |
|---|---|
| private final BusAddress address | |
| config | back to summary |
|---|---|
| private final TransportConfig config | |
| fileDescriptorSupported | back to summary |
|---|---|
| private boolean fileDescriptorSupported | |
| logger | back to summary |
|---|---|
| private final Logger logger | |
| messageFactory | back to summary |
|---|---|
| private final MessageFactory messageFactory | |
| spiLoader | back to summary |
|---|---|
| private final ServiceLoader<ISocketProvider> spiLoader | |
| TRANSPORT_ID_GENERATOR | back to summary |
|---|---|
| private static final AtomicLong TRANSPORT_ID_GENERATOR | |
| transportConnection | back to summary |
|---|---|
| private TransportConnection transportConnection | |
| transportId | back to summary |
|---|---|
| private final long transportId | |
| AbstractTransport | back to summary |
|---|---|
| protected AbstractTransport(BusAddress _address, TransportConfig _config) | |
| acceptImpl | back to summary |
|---|---|
| protected abstract SocketChannel acceptImpl() throws IOException Method to accept new incoming listening connections.
| |
| authenticate | back to summary |
|---|---|
| private void authenticate(SocketChannel _sock) throws IOException Helper method to authenticate to DBus using SASL.
| |
| bindImpl | back to summary |
|---|---|
| protected abstract void bindImpl() throws IOException Method called to prepare listening for connections.
| |
| close | back to summary |
|---|---|
| public final void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| closeTransport | back to summary |
|---|---|
| protected abstract void closeTransport() throws IOException Method which is called to close a transport.
| |
| connect | back to summary |
|---|---|
| public final SocketChannel connect() throws IOException Establish connection on created transport.
This method can only be used for non-listening connections.
| |
| connectImpl | back to summary |
|---|---|
| protected abstract SocketChannel connectImpl() throws IOException Abstract method implemented by concrete sub classes to establish a connection.
| |
| createInputOutput | back to summary |
|---|---|
| private TransportConnection createInputOutput(SocketChannel _socket) Setup message reader/writer. Will look for SPI provider first, if none is found default implementation is used. The default implementation does not support file descriptor passing!
| |
| getAddress | back to summary |
|---|---|
| protected BusAddress getAddress() Returns the
| |
| getLogger | back to summary |
|---|---|
| protected Logger getLogger() Get the logger in subclasses.
| |
| getMessageFactory | back to summary |
|---|---|
| public MessageFactory getMessageFactory() Currently configured message factory.
| |
| getSaslConfig | back to summary |
|---|---|
| protected SaslConfig getSaslConfig() Returns the current configuration used for SASL authentication.
| |
| getTransportConfig | back to summary |
|---|---|
| public TransportConfig getTransportConfig() | |
| getTransportConnection | back to summary |
|---|---|
| public TransportConnection getTransportConnection() Returns the current transport connection.
| |
| hasFileDescriptorSupport | back to summary |
|---|---|
| protected abstract boolean hasFileDescriptorSupport() Method to indicate if passing of file descriptors is allowed.
| |
| internalConnect | back to summary |
|---|---|
| private TransportConnection internalConnect(IThrowingSupplier<SocketChannel, IOException> _channelProvider) throws IOException Method used internally to do the actual connect.
| |
| isBound | back to summary |
|---|---|
| protected abstract boolean isBound() Status of the server socket if this transport is configured to be a server connection.
| |
| isConnected | back to summary |
|---|---|
| public synchronized boolean isConnected() Returns true if inputReader and outputWriter are not yet closed.
| |
| isFileDescriptorSupported | back to summary |
|---|---|
| public boolean isFileDescriptorSupported() | |
| isListening | back to summary |
|---|---|
| public final boolean isListening() True if this transport connection is a listening (server) connection.
| |
| listen | back to summary |
|---|---|
| public final TransportConnection listen() throws IOException Start listening on created transport.
This method can only be used for listening connections.
Will return the
| |
| readMessage | back to summary |
|---|---|
| public Message readMessage() throws IOException, DBusException Read a message from the underlying socket.
| |
| runCallback | back to summary |
|---|---|
| private void runCallback(Consumer<AbstractTransport> _callback) Runs a callback if not null.
| |
| setPreConnectCallback | back to summary |
|---|---|
| public void setPreConnectCallback(Consumer<AbstractTransport> _run) Set a callback which will be called right before the connection will be established to the transport.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| writeMessage | back to summary |
|---|---|
| public void writeMessage(Message _msg) throws IOException Write a message to the underlying socket.
| |