|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The notification helper maps concepts related to the Common Event Infrastructure to concepts related to messaging. This enables event consumers to interact with the messaging infrastructure by using the messaging programming model rather than a Common Event Infrastructure interface.
Field Summary | |
---|---|
static int |
CREATE_EVENT_NOTIFICATION_TYPE
Constant for event notification types. |
static int |
REMOVE_EVENT_NOTIFICATION_TYPE
Constant for event notification types. |
static int |
UNKNOWN_NOTIFICATION_TYPE
Constant for event notification types. |
static int |
UPDATE_EVENT_NOTIFICATION_TYPE
Constant for event notification types. |
Method Summary | |
---|---|
org.eclipse.hyades.logging.events.cbe.CommonBaseEvent |
getCreatedEvent(javax.jms.Message msg)
Deprecated. This method is being replaced by getEventNotifications. |
EventNotification[] |
getEventNotifications(javax.jms.Message msg)
This method is used to change a JMS message from the Common Event Infrastructure into an EventNotification array |
MessagePort[] |
getJmsQueues(java.lang.String eventGroup)
This method is used to return the array of MessagePort objects that are associated
with an event group. |
MessagePort |
getJmsTopic(java.lang.String eventGroup)
This method is used to return the MessagePort object that is associated with an
event group. |
ComponentMetaData |
getMetaData()
This method is used to return the component metadata of the notification helper. |
int |
getNotificationType(javax.jms.Message msg)
Deprecated. This method is no longer needed when using getEventNotifications. |
void |
setEventSelector(java.lang.String eventSelector)
This method is used to set an event selector for filtering notifications. |
Field Detail |
public static final int UNKNOWN_NOTIFICATION_TYPE
public static final int CREATE_EVENT_NOTIFICATION_TYPE
public static final int UPDATE_EVENT_NOTIFICATION_TYPE
public static final int REMOVE_EVENT_NOTIFICATION_TYPE
Method Detail |
public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent getCreatedEvent(javax.jms.Message msg) throws EventsException
CREATE_EVENT_NOTIFICATION_TYPE
type into an event. If the event matches the event
selector for this notification helper, the event is returned to the caller. If the event
does not match, then null is returned to the caller.
msg
- The JMS message that contains a create event notification type.
null
if the event is
filtered out by the event selector.
InvalidNotificationTypeException
- If the JMS message does not contain a notification
of type CREATE_EVENT_NOTIFICATION_TYPE
.
EventsException
- If the event selector that is set on the notification helper is not
valid for filtering events.public EventNotification[] getEventNotifications(javax.jms.Message msg) throws EventsException
If the JMS message is a create or update notification, the contained event will be evaluated against an event selector if set.
msg
- The JMS message that contains a event notification.
EventsException
- If notification helper fails to decode the JMS message.public void setEventSelector(java.lang.String eventSelector) throws EventsException
eventSelector
- The XPath expression that is used to filter event notifications.
InvalidEventSelectorException
- If the event selector is not a valid XPath expression
or if it is not a location path that starts with CommonBaseEvent.
EventsException
public MessagePort[] getJmsQueues(java.lang.String eventGroup) throws EventsException
MessagePort
objects that are associated
with an event group.
eventGroup
- The name of the event group in the configuration.
MessagePort
objects that are wrapping the queue destinations and
queue connection factories.
EventGroupNotDefinedException
- If the event group is not defined in the
configuration.
EventsException
public MessagePort getJmsTopic(java.lang.String eventGroup) throws EventsException
MessagePort
object that is associated with an
event group.
eventGroup
- The name of the event group in the configuration.
MessagePort
object that are wrapping the topic destination and topic
connection factory.
EventGroupNotDefinedException
- If the event group is not defined in the
configuration.
EventsException
public ComponentMetaData getMetaData() throws EventsException
EventsException
- If an error occurs when loading the metadata.public int getNotificationType(javax.jms.Message msg) throws EventsException
msg
- The JMS message that contains an event notification.
EventsException
- If the notification type cannot be determined.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |