|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.org.ogsadai.activity.event.CompositeActivityListener
public class CompositeActivityListener
A thread-safe composite activity listener that allows child listeners to be registered and de-registered. Whenever an event is received, it is forwarded to all registered child listeners. No guarantees are given about the order in which child listeners will receive forwarded events. All methods are synchronized and an event is forwarded to the registered child listeners using the same thread that invoked the event method.
| Constructor Summary | |
|---|---|
CompositeActivityListener()
|
|
| Method Summary | |
|---|---|
void |
addActivityListener(ActivityListener listener)
Register a new child activity listener. |
void |
completed(Activity source)
Invoked when the processing of an activity has completed |
void |
error(Activity source,
DAIException cause)
Invoked when an error occurs while processing an activity |
java.util.Collection |
getActivityListeners()
Gets an immutable collection of the registered activity listeners. |
void |
otherEvent(Activity source,
EventDetails details)
Invoked when an event that is not covered by the other event methods takes place within an activity. |
void |
pending(Activity source)
Invoked when activity has been constructed and is pending for processing. |
void |
processing(Activity source)
Invoked when the processing of an activity is about to commence. |
void |
removeActivityListener(ActivityListener listener)
De-registers a child activity listener. |
void |
terminated(Activity source)
Invoked when an activity's processing is terminated. |
void |
warning(Activity source,
Warning warning)
Invoked when an activity issues a warning during processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompositeActivityListener()
| Method Detail |
|---|
public void addActivityListener(ActivityListener listener)
listener - activity listener to registerpublic void removeActivityListener(ActivityListener listener)
listener - activity listener to de-registerpublic java.util.Collection getActivityListeners()
ActivityListener
objectspublic void pending(Activity source)
ActivityListener
pending in interface ActivityListenersource - the activity that sourced the eventpublic void processing(Activity source)
ActivityListener
processing in interface ActivityListenersource - the activity that sourced the eventpublic void terminated(Activity source)
ActivityListener
terminated in interface ActivityListenersource - the activity that sourced the eventpublic void completed(Activity source)
ActivityListener
completed in interface ActivityListenersource - the activity that sourced the event
public void error(Activity source,
DAIException cause)
ActivityListener
error in interface ActivityListenersource - the activity that sourced the eventcause - the cause of the error
public void otherEvent(Activity source,
EventDetails details)
ActivityListener
otherEvent in interface ActivityListenersource - the activity that sourced the eventdetails - details about the event
public void warning(Activity source,
Warning warning)
ActivityListener
warning in interface ActivityListenersource - the activity that sourced the eventwarning - details about the warning
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||