Top Description Fields Constructors Methods
org.osgi.service.dal

public Class FunctionEvent

extends Event
Class Inheritance
Imports
java.util.Dictionary, .HashMap, .Map, org.osgi.service.event.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 Summary

Modifier and TypeField and Description
public static final String
EVENT_CLASS

Represents the event class.

public static final String
EVENT_PACKAGE

Represents the event package.

public static final String
FUNCTION_UID

Represents an event property key for function UID.

public static final String
PROPERTY_NAME

Represents an event property key for the function property name.

public static final String
PROPERTY_VALUE

Represents an event property key for the function property value.

public static final String
TOPIC_PROPERTY_CHANGED

Represents the event topic for the function property changed.

Constructor Summary

AccessConstructor and Description
public
FunctionEvent(String
The event topic.
topic
,
Dictionary<String, ?>
The event properties.
properties
)

Constructs a new event with the specified topic and properties.

public
FunctionEvent(String
The event topic.
topic
,
Map<String, ?>
The event properties.
properties
)

Constructs a new event with the specified topic and properties.

public
FunctionEvent(String
The event topic.
topic
,
String
The event source function UID.
functionUID
,
String
The event source property name.
propName
,
FunctionData
The event source property value.
propValue
)

Constructs a new event with the specified topic, function UID, property name and property value.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The property name.
getFunctionPropertyName
()

Returns the property name.

public FunctionData

Returns:

The property value.
getFunctionPropertyValue
()

Returns the property value.

public String

Returns:

The property value change source function.
getFunctionUID
()

Returns the property value change source function identifier.

private static Map<String, ?>
prepareEventProps(String funtionUID, String propName, FunctionData propValue)

Inherited from org.osgi.service.event.Event:
containsPropertyequalsgetPropertygetPropertyNamesgetTopichashCodematchestoString

Field Detail

EVENT_CLASSback to summary
public static final String EVENT_CLASS

Represents the event class. That constant can be useful for the event handlers depending on the event filters.

EVENT_PACKAGEback to summary
public static final String EVENT_PACKAGE

Represents the event package. That constant can be useful for the event handlers depending on the event filters.

FUNCTION_UIDback to summary
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.

PROPERTY_NAMEback to summary
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.

PROPERTY_VALUEback to summary
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.

TOPIC_PROPERTY_CHANGEDback to summary
public static final String TOPIC_PROPERTY_CHANGED

Represents the event topic for the function property changed.

Constructor Detail

FunctionEventback to summary
public FunctionEvent(String topic, Dictionary<String, ?> properties)

Constructs a new event with the specified topic and properties.

Parameters
topic:String

The event topic.

properties:Dictionary<String, ?>

The event properties.

FunctionEventback to summary
public FunctionEvent(String topic, Map<String, ?> properties)

Constructs a new event with the specified topic and properties.

Parameters
topic:String

The event topic.

properties:Map<String, ?>

The event properties.

FunctionEventback to summary
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:String

The event topic.

functionUID:String

The event source function UID.

propName:String

The event source property name.

propValue:FunctionData

The event source property value.

Method Detail

getFunctionPropertyNameback to summary
public String getFunctionPropertyName()

Returns the property name. The value is same as the value of PROPERTY_NAME.

Returns:String

The property name.

getFunctionPropertyValueback to summary
public FunctionData getFunctionPropertyValue()

Returns the property value. The value is same as the value of PROPERTY_VALUE.

Returns:FunctionData

The property value.

getFunctionUIDback to summary
public String getFunctionUID()

Returns the property value change source function identifier. The value is same as the value of FUNCTION_UID property.

Returns:String

The property value change source function.

prepareEventPropsback to summary
private static Map<String, ?> prepareEventProps(String funtionUID, String propName, FunctionData propValue)