|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sas.edir.EventQueue
Keep a persistent list of EventQueueMessage objects. Messages can be retrieved from queue in order, or by key. Messages are kept segregated by application name.
Constructor Summary | |
EventQueue()
Construct an Event Queue |
|
EventQueue(java.io.File store)
Construct an Event Queue |
Method Summary | |
void |
clearMessages(EventQueueKey key,
java.lang.String application)
Clear messages from the queue matching the key. |
EventQueueMessage |
getMessage(EventQueueKey key,
java.lang.String application)
Get one message from the event queue. |
EventQueueMessage[] |
getMessages(EventQueueKey key,
java.lang.String application)
Get all the messages matching the key. |
EventQueueMessage |
peekMessage(EventQueueKey key,
java.lang.String application)
Peek at a message matching a key. |
EventQueueMessage[] |
peekMessages(EventQueueKey key,
java.lang.String application)
Peek at all the messages matching the key. |
void |
putEventMessage(EventQueueMessage eventMessage)
Put a new message onto the Event Queue |
void |
registerListener(EventQueueListener el,
EventQueueKey key,
java.lang.String application)
Register a listener. |
void |
unregisterListener(EventQueueListener el,
EventQueueKey key,
java.lang.String application)
Remove a listener from the list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EventQueue()
public EventQueue(java.io.File store) throws java.io.IOException
A
- File representing a persistent storeMethod Detail |
public void putEventMessage(EventQueueMessage eventMessage)
eventMessage
- The new message to add to the event queueapplication
- Name of the application this message belongs to.public EventQueueMessage getMessage(EventQueueKey key, java.lang.String application)
key
- A filter keyapplication
- Name of the application this message belongs to.public EventQueueMessage[] getMessages(EventQueueKey key, java.lang.String application)
key
- A filter key.application
- Name of the application to get messages for.public EventQueueMessage peekMessage(EventQueueKey key, java.lang.String application)
key
- A filter key for finding a message.application
- Name of application to get messages for.public EventQueueMessage[] peekMessages(EventQueueKey key, java.lang.String application)
key
- A filter key.application
- Name of the application to get messages for.public void clearMessages(EventQueueKey key, java.lang.String application)
key
- A filter key to determine which messages are cleared.application
- Name of application to clear messages for.public void registerListener(EventQueueListener el, EventQueueKey key, java.lang.String application)
el
- The EventQueueListener to register.key
- The key to listen for. Leave the unique id null to listen
for any event for the user.application
- The application to listen for events for.public void unregisterListener(EventQueueListener el, EventQueueKey key, java.lang.String application)
el
- The lister to removekey
- The key to stop listening for.application
- The application to stop listening on.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |