org.openorb.notify.queue

Class ConsumerProxyQueue

public class ConsumerProxyQueue extends DefaultEventQueue implements FilterableEventQueue

An event queue is an object into which events are pushed and pulled. Pushing an event is adding an event to this queue, pulling an event is retrieving an event from this queue. Events in the queue can be either Untyped, Structured, StructuredSequence and Type events. The filterable event queue adds support for filters and is able to decide if an event must be enqueued or discarded. The persistent event queue adds support for persistence. Upon receiving an event, it will be saved persistently until the event channel aggregate it has been received by all consumers.

Author: Olivier Modica

Constructor Summary
ConsumerProxyQueue(String id, int orderPolicy, boolean isPersistent, short priority, long deadline, boolean isPerformance, Logger logger)
Constructor with specified order policy
Method Summary
booleanaddFilter(Filter filter)
Add a filter to the event queue filter list
booleanpersistAndPushEvent(Any event)
Filter and push an event into the queue
booleanpersistAndPushEvent(StructuredEvent event)
Persist and push a structured event into the queue
booleanpersistAndPushEvent(Property[] event)
Persist and push a typed event into the queue
ObjectpullEvent()
Pull an event from the queue
booleanpushEvent(Object event)
Filter and push the event
voidremoveAllFilters()
Remove all filters from the event queue filter list
booleanremoveFilter(Filter filter)
Remove a filter from the event queue filter list
booleanupdateFilter(Filter filter)
Update a filter to the event queue filter list

Constructor Detail

ConsumerProxyQueue

public ConsumerProxyQueue(String id, int orderPolicy, boolean isPersistent, short priority, long deadline, boolean isPerformance, Logger logger)
Constructor with specified order policy

Method Detail

addFilter

public boolean addFilter(Filter filter)
Add a filter to the event queue filter list

persistAndPushEvent

public boolean persistAndPushEvent(Any event)
Filter and push an event into the queue

persistAndPushEvent

public boolean persistAndPushEvent(StructuredEvent event)
Persist and push a structured event into the queue

persistAndPushEvent

public boolean persistAndPushEvent(Property[] event)
Persist and push a typed event into the queue

pullEvent

public Object pullEvent()
Pull an event from the queue

pushEvent

public boolean pushEvent(Object event)
Filter and push the event

removeAllFilters

public void removeAllFilters()
Remove all filters from the event queue filter list

removeFilter

public boolean removeFilter(Filter filter)
Remove a filter from the event queue filter list

updateFilter

public boolean updateFilter(Filter filter)
Update a filter to the event queue filter list