Top Description Inners Fields Constructors Methods
org.freedesktop.dbus.connections.base

public abstract sealed Class DBusBoundPropertyHandler

extends ConnectionMethodInvocation
permits ConnectionMessageHandler
Class Inheritance
Known Direct Subclasses
org.freedesktop.dbus.connections.base.ConnectionMessageHandler
Imports
org.freedesktop.dbus.Marshalling, .MethodTuple, org.freedesktop.dbus.annotations.DBusBoundProperty, .DBusProperty, .DBusProperty.Access, org.freedesktop.dbus.connections.AbstractConnection, org.freedesktop.dbus.connections.config.ReceivingServiceConfig, .TransportConfig, org.freedesktop.dbus.connections.impl.ConnectionConfig, org.freedesktop.dbus.errors.InvalidMethodArgument, .UnknownMethod, org.freedesktop.dbus.exceptions.DBusException, .DBusExecutionException, org.freedesktop.dbus.interfaces.Properties, org.freedesktop.dbus.messages.ExportedObject, .MethodCall, org.freedesktop.dbus.messages.constants.Flags, org.freedesktop.dbus.propertyref.PropRefRemoteHandler, .PropertyRef, org.freedesktop.dbus.types.Variant, org.freedesktop.dbus.utils.Util, java.lang.reflect.Method, .Parameter, .Type, java.util.*, .Map.Entry, java.util.concurrent.atomic.AtomicBoolean, java.util.stream.Collectors

Abstract class containing methods for handling DBus properties and DBusBoundProperty annotation.
Part of the AbstractConnectionBase → ConnectionMethodInvocation → DBusBoundPropertyHandler → ConnectionMessageHandler → AbstractConnection hierarchy.
Author
hypfvieh
Since
5.1.0 - 2024-03-18

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private static final Method

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected DBusBoundPropertyHandler.PropHandled

Returns:

Any of:
PropHandled#HANDLED when property was defined by annotation and was handled by this method
PropHandled#NOT_HANDLED when object implements DBus Properties but the requested property was not defined by annotation
PropHandled#NO_PROPERTY when property is not defined by annotation and object does not implement DBus Properties
handleDBusBoundProperties
(ExportedObject
exported object
_exportObject
,
final MethodCall
method to call
_methodCall
,
Object[]
parameter to pass to method
_params
)

Method which handles the magic related to DBusBoundProperty annotation.

protected DBusBoundPropertyHandler.PropHandled

Returns:

Any of:
PropHandled#HANDLED when property was defined by annotation and was handled by this method
PropHandled#NOT_HANDLED when object implements DBus Properties but the requested property was not defined by annotation
PropHandled#NO_PROPERTY when property is not defined by annotation and object does not implement DBus Properties
handleGet
(ExportedObject
exported object
_exportObject
,
final MethodCall
method call
_methodCall
,
Object[]
parameters for method call
_params
)

Called when 'Get' method of DBus Properties interface is called.

protected DBusBoundPropertyHandler.PropHandled

Returns:

PropHandled#HANDLED when call was handled PropHandled#NOT_HANDLED otherwise
handleGetAll
(ExportedObject
exported object
_exportObject
,
final MethodCall
method call
_methodCall
)

Called when 'GetAll' method of DBus Properties interface is called.

protected DBusBoundPropertyHandler.PropHandled

Returns:

PropHandled#HANDLED when property was definied by annotation, PropHandled#NOT_HANDLED otherwise
handleSet
(ExportedObject
exported object
_exportObject
,
final MethodCall
method call
_methodCall
,
Object[]
method call parameters
_params
)

Called when 'Set' method of DBus Properties interface is called.

Inherited from org.freedesktop.dbus.connections.base.ConnectionMethodInvocation:
handleExceptioninvokedMethodReplyinvokeMethodinvokeMethodAndReplyqueueInvokeMethodsetupAndInvoke

Field Detail

PROP_GETALL_METHODback to summary
private static final Method PROP_GETALL_METHOD

Constructor Detail

DBusBoundPropertyHandlerback to summary
protected DBusBoundPropertyHandler(ConnectionConfig _conCfg, TransportConfig _transportConfig, ReceivingServiceConfig _rsCfg) throws DBusException

Method Detail

handleDBusBoundPropertiesback to summary
protected DBusBoundPropertyHandler.PropHandled handleDBusBoundProperties(ExportedObject _exportObject, final MethodCall _methodCall, Object[] _params) throws DBusException

Method which handles the magic related to DBusBoundProperty annotation.
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:ExportedObject

exported object

_methodCall:MethodCall

method to call

_params:Object[]

parameter to pass to method

Returns:DBusBoundPropertyHandler.PropHandled

Any of:
PropHandled#HANDLED when property was defined by annotation and was handled by this method
PropHandled#NOT_HANDLED when object implements DBus Properties but the requested property was not defined by annotation
PropHandled#NO_PROPERTY when property is not defined by annotation and object does not implement DBus Properties

Exceptions
DBusException:
when something fails
handleGetback to summary
protected DBusBoundPropertyHandler.PropHandled handleGet(ExportedObject _exportObject, final MethodCall _methodCall, Object[] _params)

Called when 'Get' method of DBus Properties interface is called.

Parameters
_exportObject:ExportedObject

exported object

_methodCall:MethodCall

method call

_params:Object[]

parameters for method call

Returns:DBusBoundPropertyHandler.PropHandled

Any of:
PropHandled#HANDLED when property was defined by annotation and was handled by this method
PropHandled#NOT_HANDLED when object implements DBus Properties but the requested property was not defined by annotation
PropHandled#NO_PROPERTY when property is not defined by annotation and object does not implement DBus Properties

handleGetAllback to summary
protected DBusBoundPropertyHandler.PropHandled handleGetAll(ExportedObject _exportObject, final MethodCall _methodCall) throws DBusException

Called when 'GetAll' method of DBus Properties interface is called.

Parameters
_exportObject:ExportedObject

exported object

_methodCall:MethodCall

method call

Returns:DBusBoundPropertyHandler.PropHandled

PropHandled#HANDLED when call was handled PropHandled#NOT_HANDLED otherwise

Annotations
@SuppressWarnings:unchecked
Exceptions
DBusException:
when handling fails
handleSetback to summary
protected DBusBoundPropertyHandler.PropHandled handleSet(ExportedObject _exportObject, final MethodCall _methodCall, Object[] _params)

Called when 'Set' method of DBus Properties interface is called.

Parameters
_exportObject:ExportedObject

exported object

_methodCall:MethodCall

method call

_params:Object[]

method call parameters

Returns:DBusBoundPropertyHandler.PropHandled

PropHandled#HANDLED when property was definied by annotation, PropHandled#NOT_HANDLED otherwise

org.freedesktop.dbus.connections.base back to summary

pack-priv final Enum DBusBoundPropertyHandler.PropHandled

extends Enum<DBusBoundPropertyHandler.PropHandled>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final DBusBoundPropertyHandler.PropHandled
HANDLED

Property request was handled.

public static final DBusBoundPropertyHandler.PropHandled
NO_PROPERTY

Property was not handled and Properties interface was not defined on exported object.

public static final DBusBoundPropertyHandler.PropHandled
NOT_HANDLED

Property request was not handled.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static DBusBoundPropertyHandler.PropHandled
public static DBusBoundPropertyHandler.PropHandled[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

HANDLEDback to summary
public static final DBusBoundPropertyHandler.PropHandled HANDLED

Property request was handled.

NO_PROPERTYback to summary
public static final DBusBoundPropertyHandler.PropHandled NO_PROPERTY

Property was not handled and Properties interface was not defined on exported object.

NOT_HANDLEDback to summary
public static final DBusBoundPropertyHandler.PropHandled NOT_HANDLED

Property request was not handled.

Constructor Detail

PropHandledback to summary
private PropHandled()

Method Detail

valueOfback to summary
public static DBusBoundPropertyHandler.PropHandled valueOf(String name)
valuesback to summary
public static DBusBoundPropertyHandler.PropHandled[] values()