Package org.osgi.service.dal
Class FunctionEvent
- java.lang.Object
-
- org.osgi.service.event.Event
-
- org.osgi.service.dal.FunctionEvent
-
public class FunctionEvent extends Event
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
Fields Modifier and Type Field Description static java.lang.String
EVENT_CLASS
Represents the event class.static java.lang.String
EVENT_PACKAGE
Represents the event package.static java.lang.String
FUNCTION_UID
Represents an event property key for function UID.static java.lang.String
PROPERTY_NAME
Represents an event property key for the function property name.static java.lang.String
PROPERTY_VALUE
Represents an event property key for the function property value.static java.lang.String
TOPIC_PROPERTY_CHANGED
Represents the event topic for the function property changed.
-
Constructor Summary
Constructors Constructor Description FunctionEvent(java.lang.String topic, java.lang.String functionUID, java.lang.String propName, FunctionData propValue)
Constructs a new event with the specified topic, function UID, property name and property value.FunctionEvent(java.lang.String topic, java.util.Dictionary<java.lang.String,?> properties)
Constructs a new event with the specified topic and properties.FunctionEvent(java.lang.String topic, java.util.Map<java.lang.String,?> properties)
Constructs a new event with the specified topic and properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFunctionPropertyName()
Returns the property name.FunctionData
getFunctionPropertyValue()
Returns the property value.java.lang.String
getFunctionUID()
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 Detail
-
EVENT_PACKAGE
public static final java.lang.String EVENT_PACKAGE
Represents the event package. That constant can be useful for the event handlers depending on the event filters.- See Also:
- Constant Field Values
-
EVENT_CLASS
public static final java.lang.String EVENT_CLASS
Represents the event class. That constant can be useful for the event handlers depending on the event filters.- See Also:
- Constant Field Values
-
TOPIC_PROPERTY_CHANGED
public static final java.lang.String TOPIC_PROPERTY_CHANGED
Represents the event topic for the function property changed.- See Also:
- Constant Field Values
-
FUNCTION_UID
public static final java.lang.String 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:
- Constant Field Values
-
PROPERTY_NAME
public static final java.lang.String 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:
- Constant Field Values
-
PROPERTY_VALUE
public static final java.lang.String 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:
- Constant Field Values
-
-
Constructor Detail
-
FunctionEvent
public FunctionEvent(java.lang.String topic, java.util.Dictionary<java.lang.String,?> properties)
Constructs a new event with the specified topic and properties.- Parameters:
topic
- The event topic.properties
- The event properties.
-
FunctionEvent
public FunctionEvent(java.lang.String topic, java.util.Map<java.lang.String,?> properties)
Constructs a new event with the specified topic and properties.- Parameters:
topic
- The event topic.properties
- The event properties.
-
FunctionEvent
public FunctionEvent(java.lang.String topic, java.lang.String functionUID, java.lang.String propName, FunctionData propValue)
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 Detail
-
getFunctionUID
public java.lang.String 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
public java.lang.String getFunctionPropertyName()
Returns the property name. The value is same as the value ofPROPERTY_NAME
.- Returns:
- The property name.
-
getFunctionPropertyValue
public FunctionData getFunctionPropertyValue()
Returns the property value. The value is same as the value ofPROPERTY_VALUE
.- Returns:
- The property value.
-
-