org.openorb.notify.queue
Class SupplierProxyQueue

java.lang.Object
  |
  +--org.openorb.notify.queue.DefaultEventQueue
        |
        +--org.openorb.notify.queue.SupplierProxyQueue
All Implemented Interfaces:
EventQueue, FilterableEventQueue
Direct Known Subclasses:
LoggedSupplierProxyQueue

public class SupplierProxyQueue
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. The SupplierPersistentEventQueue differs from the PersistentEventQueue as upon the pull operation it returns an event object Structure, Any, Types ) and not a Pid.

Author:
Olivier Modica

Constructor Summary
SupplierProxyQueue(java.lang.String id, int orderPolicy, boolean isPersistent, org.apache.avalon.framework.logger.Logger logger)
          Constructor with specified order policy
 
Method Summary
 boolean addFilter(Filter filter)
          Add a filter to the event queue filter list
 boolean filterAndPushEvent(org.omg.CORBA.Any event)
          Filter and push an event into the queue
 boolean filterAndPushEvent(Property[] event)
          Filter and push a typed event into the queue
 boolean filterAndPushEvent(StructuredEvent event)
          Filter and push a structured event into the queue
 java.lang.Object pullEvent()
          Pull an event from the queue
 boolean pushEvent(java.lang.Object event)
          Filter and push the event
 void removeAllFilters()
          Remove all filters from the event queue filter list
 boolean removeFilter(Filter filter)
          Remove a filter from the event queue filter list
 boolean updateFilter(Filter filter)
          Update a filter to the event queue filter list
 
Methods inherited from class org.openorb.notify.queue.DefaultEventQueue
getQueueSize, isEmpty, pushEvent, setOrderPolicy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openorb.notify.queue.EventQueue
getQueueSize, isEmpty, pushEvent, setOrderPolicy
 

Constructor Detail

SupplierProxyQueue

public SupplierProxyQueue(java.lang.String id,
                          int orderPolicy,
                          boolean isPersistent,
                          org.apache.avalon.framework.logger.Logger logger)
Constructor with specified order policy
Method Detail

pushEvent

public boolean pushEvent(java.lang.Object event)
Filter and push the event
Specified by:
pushEvent in interface EventQueue
Overrides:
pushEvent in class DefaultEventQueue

pullEvent

public java.lang.Object pullEvent()
Pull an event from the queue
Specified by:
pullEvent in interface EventQueue
Overrides:
pullEvent in class DefaultEventQueue

filterAndPushEvent

public boolean filterAndPushEvent(org.omg.CORBA.Any event)
Filter and push an event into the queue

filterAndPushEvent

public boolean filterAndPushEvent(StructuredEvent event)
Filter and push a structured event into the queue

filterAndPushEvent

public boolean filterAndPushEvent(Property[] event)
Filter and push a typed event into the queue

addFilter

public boolean addFilter(Filter filter)
Add a filter to the event queue filter list
Specified by:
addFilter in interface FilterableEventQueue

updateFilter

public boolean updateFilter(Filter filter)
Update a filter to the event queue filter list
Specified by:
updateFilter in interface FilterableEventQueue

removeFilter

public boolean removeFilter(Filter filter)
Remove a filter from the event queue filter list
Specified by:
removeFilter in interface FilterableEventQueue

removeAllFilters

public void removeAllFilters()
Remove all filters from the event queue filter list
Specified by:
removeAllFilters in interface FilterableEventQueue