Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) OSGi Alliance (2005, 2013). All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package org.osgi.service.event;
 
Defines standard names for EventHandler properties.

Author(s):
$Id: 2d17e377cae498017ad739d27ff6972357e50ee3 $
Noimplement:
 
 public interface EventConstants {

Service registration property specifying the Event topics of interest to an Event Handler service.

Event handlers SHOULD be registered with this property. Each value of this property is a string 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 )*
 

The value of this property must be of type String, String[], or Collection<String>.

See also:
Event
 
 	public static final String	EVENT_TOPIC"event.topics";

Service Registration property specifying a filter to further select Event s of interest to an 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.

The value of this property must be of type String.

 
 	public static final String	EVENT_FILTER"event.filter";

Service Registration property specifying the delivery qualities requested by an Event Handler service.

Event handlers MAY be registered with this property. Each value of this property is a string specifying a delivery quality for the Event handler.

The value of this property must be of type String, String[], or Collection<String>.

 
 	public static final String	EVENT_DELIVERY"event.delivery";

Event Handler delivery quality value specifying the Event Handler requires asynchronously delivered events be delivered in order. Ordered delivery is the default for asynchronously delivered events.

This delivery quality value is mutually exclusive with DELIVERY_ASYNC_UNORDERED. However, if both this value and DELIVERY_ASYNC_UNORDERED are specified for an event handler, this value takes precedence.

Since:
1.3
See also:
EVENT_DELIVERY
	public static final String	DELIVERY_ASYNC_ORDERED"async.ordered";

Event Handler delivery quality value specifying the Event Handler does not require asynchronously delivered events be delivered in order. This may allow an Event Admin implementation to optimize asynchronous event delivery by relaxing ordering requirements.

This delivery quality value is mutually exclusive with DELIVERY_ASYNC_ORDERED. However, if both this value and DELIVERY_ASYNC_ORDERED are specified for an event handler, DELIVERY_ASYNC_ORDERED takes precedence.

Since:
1.3
See also:
EVENT_DELIVERY
	public static final String	DELIVERY_ASYNC_UNORDERED"async.unordered";

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.
	public static final String	BUNDLE_SIGNER"bundle.signer";

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

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

Since:
1.1
	public static final String	BUNDLE_ID"bundle.id";

The Bundle object of the bundle relevant to the event. The type of the value for this event property is org.osgi.framework.Bundle.

Since:
1.1
	public static final String	BUNDLE"bundle";

The version of the bundle relevant to the event. The type of the value for this event property is org.osgi.framework.Version.

Since:
1.2
	public static final String	BUNDLE_VERSION"bundle.version";

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.
	public static final String	EVENT"event";

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

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
	public static final String	EXCEPTION_CLASS"exception.class";

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.
	public static final String	EXCEPTION_MESSAGE"exception.message";

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

A service reference. The type of the value for this event property is org.osgi.framework.ServiceReference.
	public static final String	SERVICE"service";

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

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

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

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

This constant was released with an incorrectly spelled name. It has been replaced by EXCEPTION_CLASS

Deprecated:
As of 1.1, replaced by EXCEPTION_CLASS
	public static final String	EXECPTION_CLASS"exception.class";
New to GrepCode? Check out our FAQ X