| java.lang.Object org.sakaiproject.event.impl.BaseEventTrackingService
All known Subclasses: org.sakaiproject.event.impl.ClusterEventTracking, org.sakaiproject.event.impl.BasicEventTracking,
BaseEventTrackingService | abstract public class BaseEventTrackingService implements EventTrackingService(Code) | |
BaseEventTrackingService is the base implmentation for the EventTracking service.
|
Inner Class :protected class MyObservable extends Observable | |
Method Summary | |
public void | addLocalObserver(Observer observer) Add an observer of events. | public void | addObserver(Observer observer) Add an observer of events. | public void | addPriorityObserver(Observer observer) Add an observer of events. | public void | deleteObserver(Observer observer) Delete an observer of events. | public void | destroy() Final cleanup. | public void | init() Final initialization, once all dependencies are set. | public Event | newEvent(String event, String resource, boolean modify) Construct a Event object.
Parameters: event - The Event id. Parameters: resource - The resource reference. Parameters: modify - Set to true if this event caused a resource modification, false if it was just an access. | public Event | newEvent(String event, String resource, boolean modify, int priority) Construct a Event object.
Parameters: event - The Event id. Parameters: resource - The resource reference. Parameters: modify - Set to true if this event caused a resource modification, false if it was just an access. Parameters: priority - The Event's notification priority. | protected void | notifyObservers(Event event, boolean local) Send notification about a new event to observers. | public void | post(Event event) Post an event
Parameters: event - The event object (created with newEvent()). | public void | post(Event event, UsageSession session) | public void | post(Event event, User user) Post an event on behalf of a user. | abstract protected void | postEvent(Event event) Cause this new event to get to wherever it has to go for persistence, etc. | abstract protected SessionManager | sessionManager() | abstract protected UsageSessionService | usageSessionService() |
m_localObservableHelper | protected MyObservable m_localObservableHelper(Code) | | An observable object helper for see-only-local-events observers.
|
m_observableHelper | protected MyObservable m_observableHelper(Code) | | An observable object helper.
|
m_priorityObservableHelper | protected MyObservable m_priorityObservableHelper(Code) | | An observable object helper for see-it-first priority observers.
|
addLocalObserver | public void addLocalObserver(Observer observer)(Code) | | Add an observer of events. The observer will be notified whenever there are new events. Local observers get notified only of event generated on this application server, not on those generated elsewhere.
Parameters: observer - The class observing. |
addObserver | public void addObserver(Observer observer)(Code) | | Add an observer of events. The observer will be notified whenever there are new events.
Parameters: observer - The class observing. |
addPriorityObserver | public void addPriorityObserver(Observer observer)(Code) | | Add an observer of events. The observer will be notified whenever there are new events. Priority observers get notified first, before normal observers.
Parameters: observer - The class observing. |
deleteObserver | public void deleteObserver(Observer observer)(Code) | | Delete an observer of events.
Parameters: observer - The class observing to delete. |
destroy | public void destroy()(Code) | | Final cleanup.
|
init | public void init()(Code) | | Final initialization, once all dependencies are set.
|
newEvent | public Event newEvent(String event, String resource, boolean modify)(Code) | | Construct a Event object.
Parameters: event - The Event id. Parameters: resource - The resource reference. Parameters: modify - Set to true if this event caused a resource modification, false if it was just an access. A new Event object that can be used with this service. |
newEvent | public Event newEvent(String event, String resource, boolean modify, int priority)(Code) | | Construct a Event object.
Parameters: event - The Event id. Parameters: resource - The resource reference. Parameters: modify - Set to true if this event caused a resource modification, false if it was just an access. Parameters: priority - The Event's notification priority. A new Event object that can be used with this service. |
notifyObservers | protected void notifyObservers(Event event, boolean local)(Code) | | Send notification about a new event to observers.
Parameters: event - The event to send notification about. Parameters: local - True if the event originated on this server, false if it came from another server. |
post | public void post(Event event)(Code) | | Post an event
Parameters: event - The event object (created with newEvent()). Note: the current session user will be used as the user responsible for the event. |
post | public void post(Event event, UsageSession session)(Code) | | Post an event on behalf of a user's session
Parameters: event - The event object (created with newEvent()). Parameters: session - The usage session object of the user session responsible for the event. |
post | public void post(Event event, User user)(Code) | | Post an event on behalf of a user.
Parameters: event - The event object (created with newEvent()). Parameters: user - The User object of the user responsible for the event. |
postEvent | abstract protected void postEvent(Event event)(Code) | | Cause this new event to get to wherever it has to go for persistence, etc.
Parameters: event - The new event to post. |
sessionManager | abstract protected SessionManager sessionManager()(Code) | | the SessionManager collaborator. |
|
|