|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmandala.rami.impl.CallbackListeners
This implementation of the Callback interface
provides event driven progamming style.
It dispatches the result of the asynchronous method invocation into two
categories : normal end of the method void or a value and abrupt end of the method Callback registered has result listeners
is notified sequentially. In the other case, each
Callback registered has exception handler is
notified sequentially.
Warning, when the asynchronous method invocation terminates, nothing is done if no listeners has been registered into the categorie the result is really (either a valid result or an exception).
Callback,
Serialized Form| Constructor Summary | |
CallbackListeners()
|
|
| Method Summary | |
void |
addExceptionListener(Callback exceptionListener)
Adds the specified Callback to the
exception listeners list. |
void |
addResultListener(Callback resultListener)
Adds the specified Callback to the result
listeners list. |
void |
done(InvocationInfo invocationInfo,
MethodResult methodResult)
This method is called once an asynchronous method invocation had been considered terminated. |
Enumeration |
getExceptionListeners()
Returns the list of exception listeners. |
Enumeration |
getResultListeners()
Returns the list of result listeners. |
void |
removeExceptionListener(Callback exceptionListener)
Removes the specified Callback from the
exception listeners list. |
void |
removeResultListener(Callback resultListener)
Removes the specified Callback from the
result listeners list. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CallbackListeners()
| Method Detail |
public void addResultListener(Callback resultListener)
Adds the specified Callback to the result
listeners list.
The specified resultListener will be notified when an
asynchronous method invocation terminates correctly.
resultListener - the result listenerCallbackpublic void removeResultListener(Callback resultListener)
Removes the specified Callback from the
result listeners list.
The specified resultListener will no longer be notified
when an asynchronous method invocation terminates correctly.
resultListener - the result listenerCallbackpublic void addExceptionListener(Callback exceptionListener)
Adds the specified Callback to the
exception listeners list.
The specified exceptionListener will be notified when an
asynchronous method invocation terminates incorrectly
exceptionListener - the exception listenerCallbackpublic void removeExceptionListener(Callback exceptionListener)
Removes the specified Callback from the
exception listeners list.
The specified exceptionListener will no longer be
notified so it is no longer notified when an asynchronous method
invocation has terminated incorrectly
exceptionListener - the exception listenerCallback
public void done(InvocationInfo invocationInfo,
MethodResult methodResult)
CallbackThis method is called once an asynchronous method invocation had been considered terminated.
done in interface CallbackinvocationInfo - the invocationInfo object
representing informations on the asychronous method invocation.methodResult - the MethodResult object
representing the result of the asychronous method invocation.InvocationInfo,
MethodResultpublic Enumeration getResultListeners()
Returns the list of result listeners.
public Enumeration getExceptionListeners()
Returns the list of exception listeners.
public String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||