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:
  • Field Details

    • EVENT_PACKAGE

      public static final String EVENT_PACKAGE
      Represents the event package. That constant can be useful for the event handlers depending on the event filters.
      See Also:
    • EVENT_CLASS

      public static final String 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

      public static final String TOPIC_PROPERTY_CHANGED
      Represents the event topic for the function property changed.
      See Also:
    • FUNCTION_UID

      public static final String FUNCTION_UID
      Represents an event property key for function UID. The property value type is java.lang.String. The value represents the property value change source function identifier.
      See Also:
    • PROPERTY_NAME

      public static final String PROPERTY_NAME
      Represents an event property key for the function property name. The property value type is java.lang.String. The value represents the property name.
      See Also:
    • PROPERTY_VALUE

      public static final String PROPERTY_VALUE
      Represents an event property key for the function property value. The property value type is a subclass of FunctionData. The value represents the property value.
      See Also:
  • Constructor Details

    • FunctionEvent

      public FunctionEvent(String topic, Dictionary<String,?> properties)
      Constructs a new event with the specified topic and properties.
      Parameters:
      topic - The event topic.
      properties - The event properties.
    • FunctionEvent

      public FunctionEvent(String topic, Map<String,?> properties)
      Constructs a new event with the specified topic and properties.
      Parameters:
      topic - The event topic.
      properties - The event properties.
    • FunctionEvent

      public FunctionEvent(String topic, String functionUID, 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 Details

    • getFunctionUID

      public String getFunctionUID()
      Returns the property value change source function identifier. The value is same as the value of FUNCTION_UID property.
      Returns:
      The property value change source function.
    • getFunctionPropertyName

      public String getFunctionPropertyName()
      Returns the property name. The value is same as the value of PROPERTY_NAME.
      Returns:
      The property name.
    • getFunctionPropertyValue

      public FunctionData getFunctionPropertyValue()
      Returns the property value. The value is same as the value of PROPERTY_VALUE.
      Returns:
      The property value.