Package org.osgi.service.dal
Class FunctionEvent
java.lang.Object
org.osgi.service.event.Event
org.osgi.service.dal.FunctionEvent
Asynchronous event, which marks a function property value modification. The
event can be triggered when there is a new property value, but it's possible
to have events in series with no value change. The event properties must
contain:
FUNCTION_UID
- the event source function unique identifier.PROPERTY_NAME
- the property name.PROPERTY_VALUE
- the property value. The property value type must be a subclass of FunctionData.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Represents the event class.static final String
Represents the event package.static final String
Represents an event property key for function UID.static final String
Represents an event property key for the function property name.static final String
Represents an event property key for the function property value.static final String
Represents the event topic for the function property changed. -
Constructor Summary
ConstructorDescriptionFunctionEvent
(String topic, String functionUID, String propName, FunctionData propValue) Constructs a new event with the specified topic, function UID, property name and property value.FunctionEvent
(String topic, Dictionary<String, ?> properties) Constructs a new event with the specified topic and properties.FunctionEvent
(String topic, Map<String, ?> properties) Constructs a new event with the specified topic and properties. -
Method Summary
Modifier and TypeMethodDescriptionReturns the property name.Returns the property value.Returns the property value change source function identifier.Methods inherited from class org.osgi.service.event.Event
containsProperty, equals, getProperty, getPropertyNames, getTopic, hashCode, matches, toString
-
Field Details
-
EVENT_PACKAGE
Represents the event package. That constant can be useful for the event handlers depending on the event filters.- See Also:
-
EVENT_CLASS
Represents the event class. That constant can be useful for the event handlers depending on the event filters.- See Also:
-
TOPIC_PROPERTY_CHANGED
Represents the event topic for the function property changed.- See Also:
-
FUNCTION_UID
Represents an event property key for function UID. The property value type isjava.lang.String
. The value represents the property value change source function identifier.- See Also:
-
PROPERTY_NAME
Represents an event property key for the function property name. The property value type isjava.lang.String
. The value represents the property name.- See Also:
-
PROPERTY_VALUE
Represents an event property key for the function property value. The property value type is a subclass ofFunctionData
. The value represents the property value.- See Also:
-
-
Constructor Details
-
FunctionEvent
Constructs a new event with the specified topic and properties.- Parameters:
topic
- The event topic.properties
- The event properties.
-
FunctionEvent
Constructs a new event with the specified topic and properties.- Parameters:
topic
- The event topic.properties
- The event properties.
-
FunctionEvent
Constructs a new event with the specified topic, function UID, property name and property value.- Parameters:
topic
- The event topic.functionUID
- The event source function UID.propName
- The event source property name.propValue
- The event source property value.
-
-
Method Details
-
getFunctionUID
Returns the property value change source function identifier. The value is same as the value ofFUNCTION_UID
property.- Returns:
- The property value change source function.
-
getFunctionPropertyName
Returns the property name. The value is same as the value ofPROPERTY_NAME
.- Returns:
- The property name.
-
getFunctionPropertyValue
Returns the property value. The value is same as the value ofPROPERTY_VALUE
.- Returns:
- The property value.
-