org.sakaiproject.service.legacy.event
Interface EventTrackingService

All Known Implementing Classes:
BaseEventTrackingService

public interface EventTrackingService

EventTrackingService is the Interface for the CHEF event tracking service.

The event tracking service provides activity event tracking and monitoring. Objects act as event generators, posting events to the service. Other objects act as event monitors, and are notified by the service when certain events occur. Events posted are also stored in event archives by the service.

Each event is represented by a core Event object

Version:
1.0
Author:
University of Michigan, CHEF Software Development Team
See Also:
org.chefproject.core.Event

Field Summary
static String SERVICE_NAME
          This string can be used to find the service in the service manager.
 
Method Summary
 void addLocalObserver(Observer observer)
          Add an observer of events.
 void addObserver(Observer observer)
          Add an observer of events.
 void addPriorityObserver(Observer observer)
          Add an observer of events.
 void deleteObserver(Observer observer)
          Delete an observer of events.
 Event newEvent(String event, String resource, boolean modify)
          Construct a Event object.
 Event newEvent(String event, String resource, boolean modify, int priority)
          Construct a Event object.
 void post(Event event)
          Post an event
 void post(Event event, UsageSession session)
          Post an event on behalf of a user's session
 

Field Detail

SERVICE_NAME

public static final String SERVICE_NAME
This string can be used to find the service in the service manager.

Method Detail

newEvent

public Event newEvent(String event,
                      String resource,
                      boolean modify)
Construct a Event object.

Parameters:
event - The Event id.
resource - The resource reference.
modify - Set to true if this event caused a resource modification, false if it was just an access.
Returns:
A new Event object that can be used with this service.

newEvent

public Event newEvent(String event,
                      String resource,
                      boolean modify,
                      int priority)
Construct a Event object.

Parameters:
event - The Event id.
resource - The resource reference.
modify - Set to true if this event caused a resource modification, false if it was just an access.
priority - The Event's notification priority.
Returns:
A new Event object that can be used with this service.

post

public void post(Event event)
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)
Post an event on behalf of a user's session

Parameters:
event - The event object (created with newEvent()).
session - The usage session object of the user session responsible for the event.

addObserver

public void addObserver(Observer observer)
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)
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.

addLocalObserver

public void addLocalObserver(Observer observer)
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.

deleteObserver

public void deleteObserver(Observer observer)
Delete an observer of events.

Parameters:
observer - The class observing to delete.