org.sakaiproject.util.courier
Class EventObservingCourier

java.lang.Object
  extended byorg.sakaiproject.util.courier.ObservingCourier
      extended byorg.sakaiproject.util.courier.EventObservingCourier
All Implemented Interfaces:
EventListener, Observer, SessionBindingListener
Direct Known Subclasses:
ChatObservingCourier, PresenceObservingCourier

public class EventObservingCourier
extends ObservingCourier
implements SessionBindingListener

EventObservingCourier is an ObservingCourier that watches Events, of a particular reference root. It automatically registers / un-registers as an observer with the event service.

Version:
$Revision: 632 $
Author:
University of Michigan, Sakai Software Development Team

Field Summary
protected  EventTrackingService m_eventTrackingService
          Constructor discovered injected EventTrackingService.
protected  String m_resourcePattern
          The event resource pattern - we watch for only events that start with this
 
Fields inherited from class org.sakaiproject.util.courier.ObservingCourier
m_courierService, m_deliveryId, m_elementId, m_enabled, m_location
 
Constructor Summary
EventObservingCourier(String location, String elementId, String resourcePattern)
          Construct.
 
Method Summary
protected  boolean check(Object arg)
          Check to see if we want to process or ignore this update.
protected  void finalize()
           
 String getResourcePattern()
           
 void setResourcePattern(String pattern)
           
 void valueBound(SessionBindingEvent event)
          SessionBindingListener implementation
 void valueUnbound(SessionBindingEvent event)
          Notifies the object that it is being unbound from a session.
 
Methods inherited from class org.sakaiproject.util.courier.ObservingCourier
disable, enable, getDeliveryId, getElementId, getEnabled, getLocation, justDelivered, setDeliveryId, setElementId, update
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_eventTrackingService

protected EventTrackingService m_eventTrackingService
Constructor discovered injected EventTrackingService.


m_resourcePattern

protected String m_resourcePattern
The event resource pattern - we watch for only events that start with this

Constructor Detail

EventObservingCourier

public EventObservingCourier(String location,
                             String elementId,
                             String resourcePattern)
Construct.

Parameters:
location - The key identifying the Portal Page Instance.
elementId - The key identifying the element on the Portal Page that would need a courier delivered message when things change.
Method Detail

getResourcePattern

public String getResourcePattern()

setResourcePattern

public void setResourcePattern(String pattern)

check

protected boolean check(Object arg)
Check to see if we want to process or ignore this update.

Overrides:
check in class ObservingCourier
Parameters:
arg - The arg from the update.
Returns:
true to continue, false to quit.

finalize

protected void finalize()

valueBound

public void valueBound(SessionBindingEvent event)
SessionBindingListener implementation

Specified by:
valueBound in interface SessionBindingListener
Parameters:
event - the event that identifies the session

valueUnbound

public void valueUnbound(SessionBindingEvent event)
Description copied from interface: SessionBindingListener
Notifies the object that it is being unbound from a session.

Specified by:
valueUnbound in interface SessionBindingListener
Parameters:
event - the event that identifies the session