| Modifier and Type | Field and Description |
|---|---|
| private final BusAddress | |
| private final PendingCallbackManager | |
| private final ConnectionConfig | |
| private volatile boolean | |
| private final Map | |
| private final FallbackContainer | |
| private final Map | |
| private final Map | |
| private final Map | |
| private static final Map | |
| private final Logger | |
| private final MessageFactory | |
| private final ObjectTree | |
| private final Map | |
| private final Queue | |
| private final IncomingMessageThread | |
| private final ReceivingService | |
| private final ExecutorService | |
| private AbstractTransport |
| Access | Constructor and Description |
|---|---|
| protected | AbstractConnectionBase(ConnectionConfig _conCfg, TransportConfig _transportConfig, ReceivingServiceConfig _rsCfg)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: true if connection established or already connected, false otherwiseConnects the underlying transport if it is not already connected. |
| protected abstract IncomingMessageThread | Returns: IncomingMessageThread, nevernullcurrent bus address _busAddress)Create the read thread for reading incoming messages. |
| protected synchronized void | disconnect(IDisconnectAction
action execute before actual disconnect, null if not needed _before, IDisconnectAction action execute after disconnect, null if not needed _after)Special disconnect method which may be used whenever some cleanup before or after disconnection to DBus is required. |
| public synchronized void | |
| protected < type of exception X extends Throwable> void | doWithExportedObjects(Class<X>
exception type which may be thrown _exClz, IThrowingConsumer<Map<String, ExportedObject>, X> action to execute _action)Do some action with the currently exported objects in a synchronized manor. |
| protected <T, type of exception X extends Throwable> T | Returns: whatever the action returnsexception type which may be thrown _exClz, IThrowingFunction<Map<String, ExportedObject>, T, X> action to execute _action)Do some action with the currently exported objects in a synchronized manor. |
| public BusAddress | |
| protected BusAddress | |
| protected PendingCallbackManager | |
| public static DBusCallInfo | Returns: the DBusCallInfo for this method call, or null if we are not in a method call.Returns a structure with information on the current method call. |
| protected ConnectionConfig | |
| public IDisconnectCallback | Returns: callback or null if no callback registeredReturns the currently configured disconnect callback. |
| public DBusExecutionException | Returns: A DBusExecutionException, or null if no error is pending.Return any DBus error which has been received. |
| public abstract DBusInterface | Returns: DBusInterface compatible objectsource _source, String path _path)Retrieves an remote object using source and path. |
| public abstract <T extends DBusInterface> T | Returns: DBusInterface compatible objectsource _source, String path _path, Class<T> class of remote object _type)Retrieves an remote object using source and path. |
| public String | |
| protected FallbackContainer | |
| protected Map | |
| protected Map | |
| protected Map | |
| protected Map | |
| protected Logger | |
| public abstract String | |
| public MessageFactory | |
| public ObjectTree | |
| protected Map | |
| protected Queue | |
| protected ReceivingService | |
| protected AbstractTransport | |
| public TransportConfig | |
| protected final synchronized void | internalDisconnect(IOException
exception caused the disconnection (null if intended disconnect) _connectionError)Disconnects the DBus session. |
| public boolean | |
| protected void | |
| pack-priv Message | |
| protected void | rejectUnknownProperty(final MethodCall
method call _methodCall, Object[] params _params)Sends a reply on the bus to signal a non-existing property was requested. |
| public void | |
| private void | |
| public void | setDisconnectCallback(IDisconnectCallback
callback to execute or null to remove _disconnectCallback)
Deprecated
for removal since 5.1.0 - 2024-07-12. should be set on construction using the builder
Set the callback which will be notified when a disconnection happens. |
| public String | |
| public void |
| busAddress | back to summary |
|---|---|
| private final BusAddress busAddress | |
| callbackManager | back to summary |
|---|---|
| private final PendingCallbackManager callbackManager | |
| connectionConfig | back to summary |
|---|---|
| private final ConnectionConfig connectionConfig | |
| disconnecting | back to summary |
|---|---|
| private volatile boolean disconnecting | |
| exportedObjects | back to summary |
|---|---|
| private final Map<String, ExportedObject> exportedObjects | |
| fallbackContainer | back to summary |
|---|---|
| private final FallbackContainer fallbackContainer | |
| genericHandledSignals | back to summary |
|---|---|
| private final Map<DBusMatchRule, Queue<DBusSigHandler<DBusSignal>>> genericHandledSignals | |
| handledSignals | back to summary |
|---|---|
| private final Map<DBusMatchRule, Queue<DBusSigHandler<? extends DBusSignal>>> handledSignals | |
| importedObjects | back to summary |
|---|---|
| private final Map<DBusInterface, RemoteObject> importedObjects | |
| INFOMAP | back to summary |
|---|---|
| private static final Map<Thread, DBusCallInfo> INFOMAP | |
| logger | back to summary |
|---|---|
| private final Logger logger | |
| messageFactory | back to summary |
|---|---|
| private final MessageFactory messageFactory | |
| objectTree | back to summary |
|---|---|
| private final ObjectTree objectTree | |
| pendingCalls | back to summary |
|---|---|
| private final Map<Long, MethodCall> pendingCalls | |
| pendingErrorQueue | back to summary |
|---|---|
| private final Queue<Error> pendingErrorQueue | |
| readerThread | back to summary |
|---|---|
| private final IncomingMessageThread readerThread | |
| receivingService | back to summary |
|---|---|
| private final ReceivingService receivingService | |
| senderService | back to summary |
|---|---|
| private final ExecutorService senderService | |
| transport | back to summary |
|---|---|
| private AbstractTransport transport | |
| AbstractConnectionBase | back to summary |
|---|---|
| protected AbstractConnectionBase(ConnectionConfig _conCfg, TransportConfig _transportConfig, ReceivingServiceConfig _rsCfg) throws DBusException | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Disconnect this session (for use in try-with-resources).
| |
| connect | back to summary |
|---|---|
| public boolean connect() throws IOException Connects the underlying transport if it is not already connected. Will work for both, client and server (listening) connections.
| |
| createReaderThread | back to summary |
|---|---|
| protected abstract IncomingMessageThread createReaderThread(BusAddress _busAddress) Create the read thread for reading incoming messages.
| |
| disconnect | back to summary |
|---|---|
| protected synchronized void disconnect(IDisconnectAction _before, IDisconnectAction _after) Special disconnect method which may be used whenever some cleanup before or after disconnection to DBus is required.
| |
| disconnect | back to summary |
|---|---|
| public synchronized void disconnect() Disconnect from the Bus. | |
| doWithExportedObjects | back to summary |
|---|---|
| protected <X extends Throwable> void doWithExportedObjects(Class<X> _exClz, IThrowingConsumer<Map<String, ExportedObject>, X> _action) throws IThrowingConsumer-:X Do some action with the currently exported objects in a synchronized manor.
| |
| doWithExportedObjectsAndReturn | back to summary |
|---|---|
| protected <T, X extends Throwable> T doWithExportedObjectsAndReturn(Class<X> _exClz, IThrowingFunction<Map<String, ExportedObject>, T, X> _action) throws IThrowingFunction-:X Do some action with the currently exported objects in a synchronized manor.
| |
| getAddress | back to summary |
|---|---|
| public BusAddress getAddress() Returns the address this connection is connected to.
| |
| getBusAddress | back to summary |
|---|---|
| protected BusAddress getBusAddress() | |
| getCallbackManager | back to summary |
|---|---|
| protected PendingCallbackManager getCallbackManager() | |
| getCallInfo | back to summary |
|---|---|
| public static DBusCallInfo getCallInfo() Returns a structure with information on the current method call.
| |
| getConnectionConfig | back to summary |
|---|---|
| protected ConnectionConfig getConnectionConfig() | |
| getDisconnectCallback | back to summary |
|---|---|
| public IDisconnectCallback getDisconnectCallback() Returns the currently configured disconnect callback.
| |
| getError | back to summary |
|---|---|
| public DBusExecutionException getError() Return any DBus error which has been received.
| |
| getExportedObject | back to summary |
|---|---|
| public abstract DBusInterface getExportedObject(String _source, String _path) throws DBusException Retrieves an remote object using source and path. Will try to find suitable exported DBusInterface automatically.
| |
| getExportedObject | back to summary |
|---|---|
| public abstract <T extends DBusInterface> T getExportedObject(String _source, String _path, Class<T> _type) throws DBusException Retrieves an remote object using source and path. Will use the given type as object class.
| |
| getExportedObject | back to summary |
|---|---|
| public String getExportedObject(DBusInterface _interface) throws DBusException | |
| getFallbackContainer | back to summary |
|---|---|
| protected FallbackContainer getFallbackContainer() | |
| getGenericHandledSignals | back to summary |
|---|---|
| protected Map | |
| getHandledSignals | back to summary |
|---|---|
| protected Map | |
| getImportedObjects | back to summary |
|---|---|
| protected Map | |
| getInfoMap | back to summary |
|---|---|
| protected Map | |
| getLogger | back to summary |
|---|---|
| protected Logger getLogger() | |
| getMachineId | back to summary |
|---|---|
| public abstract String getMachineId() The generated UUID of this machine.
| |
| getMessageFactory | back to summary |
|---|---|
| public MessageFactory getMessageFactory() | |
| getObjectTree | back to summary |
|---|---|
| public ObjectTree getObjectTree() | |
| getPendingCalls | back to summary |
|---|---|
| protected Map | |
| getPendingErrorQueue | back to summary |
|---|---|
| protected Queue | |
| getReceivingService | back to summary |
|---|---|
| protected ReceivingService getReceivingService() | |
| getTransport | back to summary |
|---|---|
| protected AbstractTransport getTransport() The currently configured transport.
| |
| getTransportConfig | back to summary |
|---|---|
| public TransportConfig getTransportConfig() Returns the transport's configuration. Note changing any value will not change the transport settings!
| |
| internalDisconnect | back to summary |
|---|---|
| protected final synchronized void internalDisconnect(IOException _connectionError) Disconnects the DBus session. This method is final as it should never be overwritten by subclasses, otherwise
we have an endless recursion when using
| |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() Whether the transport is connected.
| |
| listen | back to summary |
|---|---|
| protected void listen() throws IOException Start reading and messages.
| |
| readIncoming | back to summary |
|---|---|
| pack-priv Message readIncoming() throws DBusException | |
| rejectUnknownProperty | back to summary |
|---|---|
| protected void rejectUnknownProperty(final MethodCall _methodCall, Object[] _params) throws DBusException Sends a reply on the bus to signal a non-existing property was requested.
| |
| sendMessage | back to summary |
|---|---|
| public void sendMessage(Message _message) Send a message or signal to the DBus daemon.
| |
| sendMessageInternally | back to summary |
|---|---|
| private void sendMessageInternally(Message _message) Send a message to DBus.
| |
| setDisconnectCallback | back to summary |
|---|---|
| public void setDisconnectCallback(IDisconnectCallback _disconnectCallback)
Deprecated for removal since 5.1.0 - 2024-07-12. should be set on construction using the builder Set the callback which will be notified when a disconnection happens. Use null to remove.
| |
| 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- | |
| unExportObject | back to summary |
|---|---|
| public void unExportObject(String _objectpath) Stop Exporting an object
| |