public class EventService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CONFIG_VALUE_PRIORITY_HIGH
The configuration value to specify the event is of high priority.
|
static java.lang.String | CONFIG_VALUE_PRIORITY_LOW
The configuration value to specify the event is of low priority.
|
static java.lang.String | CONSTANT_DEFAULT_PUBLISHER_KEY
This is the key that represents the default publisher.
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.lang.String | EVENT_CONTEXT_SERIALIZER_PROPERTY_FILE
This is the name of the properties file that contains the mapping between the context name and the context serializer to create the appropriate CBE context data.
|
static java.lang.String | EVENT_FACTORY_PROPERTY_FILE
This is the name of the properties file that contains the mapping between event identifiers and the EventFactory object to create the CommonBaseEvent objects.
|
static java.lang.String | EVENT_PUBLISHER_PROPERTY_FILE
This is the name of the properties file that contains the mapping between the event's extension name and the EventPublisher that will raise the event.
|
static short | PRIORITY_HIGH
This is the constant value that represents high priority.
|
static short | PRIORITY_LOW
This is the constant value that represents low priority.
|
static short | PRIORITY_MEDIUM
This is the constant value that represents medium priority.
|
Modifier and Type | Method and Description |
---|---|
void | changePriority(java.lang.String eventName, java.lang.String eventKey, short priority)
This method changes the priority of the event that matches the event key that uniquely identifies the event.
|
org.eclipse.hyades.logging.events.cbe.CommonBaseEvent | createEvent(java.lang.String eventIdentifier, java.lang.Object eventData)
This method creates a CommonBaseEvent object for the specified event type and populates the object with the specified event data.
|
org.eclipse.hyades.logging.events.cbe.CommonBaseEvent | createEvent(java.lang.String eventIdentifier, java.lang.Object eventData, java.lang.String eventKey)
This method creates a CommonBaseEvent object for the specified event type and populates the object with the specified event data.
|
void | disableAllEvents()
This method disables all events.
|
void | disableEvent(java.lang.String eventName)
This method disables the specified event.
|
void | enableEvent(java.lang.String eventName)
This method enables the specified event.
|
void | enableEvent(java.lang.String eventName, com.ibm.commerce.event.EventContextFilter contextFilter)
This method enables the specified event.
|
void | enableEvent(java.lang.String eventName, java.lang.String priority, com.ibm.commerce.event.EventContextFilter contextFilter)
This method enables the specified event.
|
protected EventContextSerializer | getEventContextSerializer(java.lang.String contextName)
This method gets the EventContextSerializer associated with the context.
|
protected EventFactory | getEventFactory(java.lang.String eventName)
This method gets the event factory for the specified event name.
|
protected EventPublisher | getEventPublisher(java.lang.String eventName)
This method gets the event publisher for the specified event name.
|
boolean | isEventEnabled(java.lang.String eventName)
This method returns whether the specified event name is enabled.
|
void | publishEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent)
This method publishes the specified CommonBaseEvent object.
|
void | raiseEvent(ActivityToken activityToken, java.lang.String eventName, java.lang.Object eventData)
This method raises the specified event with the given event data to associate with the event.
|
void | raiseEvent(ActivityToken activityToken, java.lang.String eventName, java.lang.Object eventData, java.lang.String eventKey)
This method raises the specified event with the given event data to associate with the event.
|
void | raiseEvent(java.lang.String eventName, java.lang.Object eventData)
This method raises the specified event with the given event data to associate with the event.
|
void | raiseEvent(java.lang.String eventName, java.lang.Object eventData, java.lang.String eventKey)
This method raises the specified event with the given event data to associate with the event.
|
void | reload()
This method reloads the configuration of the event service to pick up the new and changed event factories and publishers that will create and publish events.
|
static EventService | singleton()
This method gets the singleton object of the event service for the running instance.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String EVENT_FACTORY_PROPERTY_FILE
public static final java.lang.String EVENT_PUBLISHER_PROPERTY_FILE
public static final java.lang.String EVENT_CONTEXT_SERIALIZER_PROPERTY_FILE
public static final java.lang.String CONSTANT_DEFAULT_PUBLISHER_KEY
public static final short PRIORITY_HIGH
public static final short PRIORITY_MEDIUM
public static final short PRIORITY_LOW
public static final java.lang.String CONFIG_VALUE_PRIORITY_HIGH
public static final java.lang.String CONFIG_VALUE_PRIORITY_LOW
public static EventService singleton()
public void reload()
public boolean isEventEnabled(java.lang.String eventName)
public void enableEvent(java.lang.String eventName)
public void enableEvent(java.lang.String eventName, com.ibm.commerce.event.EventContextFilter contextFilter)
public void enableEvent(java.lang.String eventName, java.lang.String priority, com.ibm.commerce.event.EventContextFilter contextFilter)
public void disableEvent(java.lang.String eventName)
public void disableAllEvents()
public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent createEvent(java.lang.String eventIdentifier, java.lang.Object eventData)
public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent createEvent(java.lang.String eventIdentifier, java.lang.Object eventData, java.lang.String eventKey)
public void publishEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent commonBaseEvent) throws org.eclipse.hyades.logging.events.cbe.CompletionException
public void changePriority(java.lang.String eventName, java.lang.String eventKey, short priority) throws java.lang.Exception
public void raiseEvent(java.lang.String eventName, java.lang.Object eventData)
public void raiseEvent(java.lang.String eventName, java.lang.Object eventData, java.lang.String eventKey)
public void raiseEvent(ActivityToken activityToken, java.lang.String eventName, java.lang.Object eventData)
public void raiseEvent(ActivityToken activityToken, java.lang.String eventName, java.lang.Object eventData, java.lang.String eventKey)
protected EventFactory getEventFactory(java.lang.String eventName)
protected EventPublisher getEventPublisher(java.lang.String eventName)
protected EventContextSerializer getEventContextSerializer(java.lang.String contextName)