|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmandala.rami.impl.CallbackList
Provides a list of Callback seen as a unique
Callback.
The order callbacks are invoked is the FIFO order.
If a callback in the list is null it is not
used.
CallbackList usage:
Since only one
callback is used on asynchronous method invocation termination as
specified in the AsynchronousReference interface, this
callback list is encourage to be used when specifying a local
method scope callback such as in the following code:
ar.call(m, args, new CallbackList(new Callback[]{new Callback() {
public void done(InvocationInfo i, MethodResult r) {
System.out.println(i.getMethod() + " terminated!");
}},
ar.getCallbackManager().getLocalCallback(),
ar.getCallbackManager().getGlobalManager()}));
In the above code, the customized callback will be used,
followed by the local thread scope one (if non null),
and the global object scope one (if non null).
Callback,
AsynchronousReference,
CallbackManager,
Serialized Form| Field Summary | |
protected java.util.List |
list
The callbacks list. |
| Constructor Summary | |
CallbackList()
Creates a new CallbackList instance with no
callback in it. |
|
CallbackList(Callback[] list)
Creates a new CallbackList instance. |
|
CallbackList(java.util.List list)
Creates a new CallbackList instance. |
|
| Method Summary | |
void |
addCallback(Callback callback)
|
void |
done(InvocationInfo invocationInfo,
MethodResult methodResult)
This method is called once an asynchronous method invocation had been considered terminated. |
Callback[] |
getList()
|
void |
remove(Callback callback)
|
void |
setList(Callback[] list)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.List list
The callbacks list.
| Constructor Detail |
public CallbackList()
Creates a new CallbackList instance with no
callback in it.
public CallbackList(Callback[] list)
Creates a new CallbackList instance.
null callback in the given list is valid.
list - a Callback[] valuepublic CallbackList(java.util.List list)
Creates a new CallbackList instance.
list - a List value| Method Detail |
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 void addCallback(Callback callback)
public void remove(Callback callback)
public Callback[] getList()
public void setList(Callback[] list)
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||