|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ActivemathEventSubscriptionService
Interface for event subscription.
| Method Summary | |
|---|---|
void |
subscribe(ActivemathEventListener listener)
Subscribe a listener for all events. |
void |
subscribe(ActivemathEventListener listener,
EventFilterList include,
EventFilterList exclude)
Subscribe a listener with an include and exclude event filter list. |
void |
unsubscribe(ActivemathEventListener listener)
Unsubscribe a listener. |
| Method Detail |
|---|
void subscribe(ActivemathEventListener listener,
EventFilterList include,
EventFilterList exclude)
Example usage for event filters:
EventFilterList includeFilter = new EventFilterList();
includeFilter.add(UserLoggedInEvent.EVENT_TYPE); // subscribe by String...
includeFilter.add("ExerciseFinished"); // also by String
includeFilter.add(UserLoggedOutEvent.class); // or subscribe by Class
includeFilter.add(ItemEvent.class); // or subscribe by event tag
EventManager.getInstance().subscribe(this, includeFilter, null);
This will replace any previous subscription of listener.
listener - - listener to send events toinclude - - events to include, or null (will include all)exclude - - events to exclude, or null (will exclude none)void subscribe(ActivemathEventListener listener)
This will replace any previous subscription of listener.
void unsubscribe(ActivemathEventListener listener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||