Module org.freedesktop.dbus
Class DBusBoundPropertyHandler
java.lang.Object
org.freedesktop.dbus.connections.base.AbstractConnectionBase
org.freedesktop.dbus.connections.base.ConnectionMethodInvocation
org.freedesktop.dbus.connections.base.DBusBoundPropertyHandler
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
ConnectionMessageHandler
public abstract sealed class DBusBoundPropertyHandler
extends ConnectionMethodInvocation
permits ConnectionMessageHandler
Abstract class containing methods for handling DBus properties and
Part of the
DBusBoundProperty annotation. Part of the
AbstractConnectionBase → ConnectionMethodInvocation
→ DBusBoundPropertyHandler → ConnectionMessageHandler → AbstractConnection hierarchy.- Since:
- 5.1.0 - 2024-03-18
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enum -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDBusBoundPropertyHandler(ConnectionConfig _conCfg, TransportConfig _transportConfig, ReceivingServiceConfig _rsCfg) -
Method Summary
Modifier and TypeMethodDescriptionprotected DBusBoundPropertyHandler.PropHandledhandleDBusBoundProperties(ExportedObject _exportObject, MethodCall _methodCall, Object[] _params) Method which handles the magic related toDBusBoundPropertyannotation.
It takes care of proper method calling (calling Get/Set stuff on DBus Properties interface)
and will also take care of converting wrapped Variant types.protected DBusBoundPropertyHandler.PropHandledhandleGet(ExportedObject _exportObject, MethodCall _methodCall, Object[] _params) Called when 'Get' method of DBusPropertiesinterface is called.protected DBusBoundPropertyHandler.PropHandledhandleGetAll(ExportedObject _exportObject, MethodCall _methodCall) Called when 'GetAll' method of DBusPropertiesinterface is called.protected DBusBoundPropertyHandler.PropHandledhandleSet(ExportedObject _exportObject, MethodCall _methodCall, Object[] _params) Called when 'Set' method of DBusPropertiesinterface is called.Methods inherited from class org.freedesktop.dbus.connections.base.ConnectionMethodInvocation
handleException, invokedMethodReply, invokeMethod, invokeMethodAndReply, queueInvokeMethod, setupAndInvokeMethods inherited from class org.freedesktop.dbus.connections.base.AbstractConnectionBase
close, connect, createReaderThread, disconnect, disconnect, doWithExportedObjects, doWithExportedObjectsAndReturn, getAddress, getBusAddress, getCallbackManager, getCallInfo, getConnectionConfig, getDisconnectCallback, getError, getExportedObject, getExportedObject, getExportedObject, getFallbackContainer, getGenericHandledSignals, getHandledSignals, getImportedObjects, getInfoMap, getLogger, getMachineId, getMessageFactory, getObjectTree, getPendingCalls, getPendingErrorQueue, getReceivingService, getTransport, getTransportConfig, internalDisconnect, isConnected, listen, readIncoming, rejectUnknownProperty, sendMessage, setDisconnectCallback, toString, unExportObject
-
Field Details
-
PROP_GETALL_METHOD
-
-
Constructor Details
-
DBusBoundPropertyHandler
protected DBusBoundPropertyHandler(ConnectionConfig _conCfg, TransportConfig _transportConfig, ReceivingServiceConfig _rsCfg) throws DBusException - Throws:
DBusException
-
-
Method Details
-
handleDBusBoundProperties
protected DBusBoundPropertyHandler.PropHandled handleDBusBoundProperties(ExportedObject _exportObject, MethodCall _methodCall, Object[] _params) throws DBusException Method which handles the magic related toDBusBoundPropertyannotation.
It takes care of proper method calling (calling Get/Set stuff on DBus Properties interface)
and will also take care of converting wrapped Variant types.- Parameters:
_exportObject- exported object_methodCall- method to call_params- parameter to pass to method- Returns:
- Any of:
DBusBoundPropertyHandler.PropHandled.HANDLEDwhen property was defined by annotation and was handled by this method
DBusBoundPropertyHandler.PropHandled.NOT_HANDLEDwhen object implements DBus Properties but the requested property was not defined by annotation
DBusBoundPropertyHandler.PropHandled.NO_PROPERTYwhen property is not defined by annotation and object does not implement DBus Properties - Throws:
DBusException- when something fails
-
handleGetAll
protected DBusBoundPropertyHandler.PropHandled handleGetAll(ExportedObject _exportObject, MethodCall _methodCall) throws DBusException Called when 'GetAll' method of DBusPropertiesinterface is called.- Parameters:
_exportObject- exported object_methodCall- method call- Returns:
DBusBoundPropertyHandler.PropHandled.HANDLEDwhen call was handledDBusBoundPropertyHandler.PropHandled.NOT_HANDLEDotherwise- Throws:
DBusException- when handling fails
-
handleGet
protected DBusBoundPropertyHandler.PropHandled handleGet(ExportedObject _exportObject, MethodCall _methodCall, Object[] _params) Called when 'Get' method of DBusPropertiesinterface is called.- Parameters:
_exportObject- exported object_methodCall- method call_params- parameters for method call- Returns:
- Any of:
DBusBoundPropertyHandler.PropHandled.HANDLEDwhen property was defined by annotation and was handled by this method
DBusBoundPropertyHandler.PropHandled.NOT_HANDLEDwhen object implements DBus Properties but the requested property was not defined by annotation
DBusBoundPropertyHandler.PropHandled.NO_PROPERTYwhen property is not defined by annotation and object does not implement DBus Properties
-
handleSet
protected DBusBoundPropertyHandler.PropHandled handleSet(ExportedObject _exportObject, MethodCall _methodCall, Object[] _params) Called when 'Set' method of DBusPropertiesinterface is called.- Parameters:
_exportObject- exported object_methodCall- method call_params- method call parameters- Returns:
DBusBoundPropertyHandler.PropHandled.HANDLEDwhen property was definied by annotation,DBusBoundPropertyHandler.PropHandled.NOT_HANDLEDotherwise
-