org.sakaiproject.util
Class EventObservingCourier

java.lang.Object
  extended by org.sakaiproject.util.ObservingCourier
      extended by org.sakaiproject.util.EventObservingCourier
All Implemented Interfaces:
EventListener, Observer, ObservingCourier, org.sakaiproject.tool.api.SessionBindingListener

public class EventObservingCourier
extends ObservingCourier
implements org.sakaiproject.tool.api.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.


Field Summary
protected  org.sakaiproject.event.api.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.ObservingCourier
m_courierService, m_deliveryId, m_elementId, m_enabled, m_location
 
Constructor Summary
EventObservingCourier(String location, String elementId, String resourcePattern)
          Construct.
 
Method Summary
 boolean check(Object arg)
          Check to see if we want to process or ignore this update.
 String getResourcePattern()
           
 void setResourcePattern(String pattern)
           
 void valueBound(org.sakaiproject.tool.api.SessionBindingEvent event)
          SessionBindingListener implementation
 void valueUnbound(org.sakaiproject.tool.api.SessionBindingEvent event)
           
 
Methods inherited from class org.sakaiproject.util.ObservingCourier
disable, enable, getDeliveryId, getElementId, getEnabled, getLocation, justDelivered, setDeliveryId, setElementId, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_eventTrackingService

protected org.sakaiproject.event.api.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.
The - event resource pattern - we watch for only events whose ref start with this.
Method Detail

getResourcePattern

public String getResourcePattern()

setResourcePattern

public void setResourcePattern(String pattern)

check

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

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

valueBound

public void valueBound(org.sakaiproject.tool.api.SessionBindingEvent event)
SessionBindingListener implementation

Specified by:
valueBound in interface org.sakaiproject.tool.api.SessionBindingListener

valueUnbound

public void valueUnbound(org.sakaiproject.tool.api.SessionBindingEvent event)
Specified by:
valueUnbound in interface org.sakaiproject.tool.api.SessionBindingListener


Copyright © 2003-2012 The Sakai Foundation. All Rights Reserved.