org.osgi.service.event
Interface EventConstants


public interface EventConstants

Defines standard names for EventHandler properties.

Version:
$Revision: 7368 $

Field Summary
static String BUNDLE
          The Bundle object of the bundle relevant to the event.
static String BUNDLE_ID
          The Bundle id of the bundle relevant to the event.
static String BUNDLE_SIGNER
          The Distinguished Names of the signers of the bundle relevant to the event.
static String BUNDLE_SYMBOLICNAME
          The Bundle Symbolic Name of the bundle relevant to the event.
static String BUNDLE_VERSION
          The version of the bundle relevant to the event.
static String EVENT
          The forwarded event object.
static String EVENT_FILTER
          Service Registration property (named event.filter) specifying a filter to further select Event s of interest to a Event Handler service.
static String EVENT_TOPIC
          Service registration property (named event.topics) specifying the Event topics of interest to a Event Handler service.
static String EXCEPTION
          An exception or error.
static String EXCEPTION_CLASS
          The name of the exception type.
static String EXCEPTION_MESSAGE
          The exception message.
static String EXECPTION_CLASS
          Deprecated. As of 1.1, replaced by EXCEPTION_CLASS
static String MESSAGE
          A human-readable message that is usually not localized.
static String SERVICE
          A service reference.
static String SERVICE_ID
          A service's id.
static String SERVICE_OBJECTCLASS
          A service's objectClass.
static String SERVICE_PID
          A service's persistent identity.
static String TIMESTAMP
          The time when the event occurred, as reported by System.currentTimeMillis().
 

Field Detail

EVENT_TOPIC

static final String EVENT_TOPIC
Service registration property (named event.topics) specifying the Event topics of interest to a Event Handler service.

Event handlers SHOULD be registered with this property. The value of the property is a string or an array of strings that describe the topics in which the handler is interested. An asterisk ('*') may be used as a trailing wildcard. Event Handlers which do not have a value for this property must not receive events. More precisely, the value of each string must conform to the following grammar:

  topic-description := '*' | topic ( '/*' )?
  topic := token ( '/' token )*
 

See Also:
Event, Constant Field Values

EVENT_FILTER

static final String EVENT_FILTER
Service Registration property (named event.filter) specifying a filter to further select Event s of interest to a Event Handler service.

Event handlers MAY be registered with this property. The value of this property is a string containing an LDAP-style filter specification. Any of the event's properties may be used in the filter expression. Each event handler is notified for any event which belongs to the topics in which the handler has expressed an interest. If the event handler is also registered with this service property, then the properties of the event must also match the filter for the event to be delivered to the event handler.

If the filter syntax is invalid, then the Event Handler must be ignored and a warning should be logged.

See Also:
Event, Filter, Constant Field Values

BUNDLE_SIGNER

static final String BUNDLE_SIGNER
The Distinguished Names of the signers of the bundle relevant to the event. The type of the value for this event property is String or Collection of String.

See Also:
Constant Field Values

BUNDLE_SYMBOLICNAME

static final String BUNDLE_SYMBOLICNAME
The Bundle Symbolic Name of the bundle relevant to the event. The type of the value for this event property is String.

See Also:
Constant Field Values

BUNDLE_ID

static final String BUNDLE_ID
The Bundle id of the bundle relevant to the event. The type of the value for this event property is Long.

Since:
1.1
See Also:
Constant Field Values

BUNDLE

static final String BUNDLE
The Bundle object of the bundle relevant to the event. The type of the value for this event property is Bundle.

Since:
1.1
See Also:
Constant Field Values

BUNDLE_VERSION

static final String BUNDLE_VERSION
The version of the bundle relevant to the event. The type of the value for this event property is Version.

Since:
1.2
See Also:
Constant Field Values

EVENT

static final String EVENT
The forwarded event object. Used when rebroadcasting an event that was sent via some other event mechanism. The type of the value for this event property is Object.

See Also:
Constant Field Values

EXCEPTION

static final String EXCEPTION
An exception or error. The type of the value for this event property is Throwable.

See Also:
Constant Field Values

EXCEPTION_CLASS

static final String EXCEPTION_CLASS
The name of the exception type. Must be equal to the name of the class of the exception in the event property EXCEPTION. The type of the value for this event property is String.

Since:
1.1
See Also:
Constant Field Values

EXCEPTION_MESSAGE

static final String EXCEPTION_MESSAGE
The exception message. Must be equal to the result of calling getMessage() on the exception in the event property EXCEPTION. The type of the value for this event property is String.

See Also:
Constant Field Values

MESSAGE

static final String MESSAGE
A human-readable message that is usually not localized. The type of the value for this event property is String.

See Also:
Constant Field Values

SERVICE

static final String SERVICE
A service reference. The type of the value for this event property is ServiceReference.

See Also:
Constant Field Values

SERVICE_ID

static final String SERVICE_ID
A service's id. The type of the value for this event property is Long.

See Also:
Constant Field Values

SERVICE_OBJECTCLASS

static final String SERVICE_OBJECTCLASS
A service's objectClass. The type of the value for this event property is String[].

See Also:
Constant Field Values

SERVICE_PID

static final String SERVICE_PID
A service's persistent identity. The type of the value for this event property is String.

See Also:
Constant Field Values

TIMESTAMP

static final String TIMESTAMP
The time when the event occurred, as reported by System.currentTimeMillis(). The type of the value for this event property is Long.

See Also:
Constant Field Values

EXECPTION_CLASS

static final String EXECPTION_CLASS
Deprecated. As of 1.1, replaced by EXCEPTION_CLASS
This constant was released with an incorrectly spelled name. It has been replaced by EXCEPTION_CLASS

See Also:
Constant Field Values


Copyright © 2006-2011 OSGi Alliance. All Rights Reserved.