|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
T - This type identifier specifies the type of data which may be passed
to the deferrable object via the
onCallback method.U - This type identified specifies the type of data which will be
returned by either the onCallback or onErrback
method.public interface Deferrable<T,U>
Defines the deferrable callback interface. Any object which implements this interface is referred to as a deferrable object, implying that it supports deferred callbacks.
| Method Summary | |
|---|---|
U |
onCallback(Deferred<T> deferred,
T data)
This is the callback handler for deferrable objects. |
U |
onErrback(Deferred<T> deferred,
java.lang.Exception error)
This is the error callback handler for deferrable objects. |
| Method Detail |
|---|
U onCallback(Deferred<T> deferred,
T data)
throws java.lang.Exception
deferred - This is the deferred event object through which the callback was
issued.data - This is a data object of type T which encapsulates
any information being passed back as a result of the deferred
event.
U which will be
propagated to the next deferrable in the chain as the
onCallback data parameter.
java.lang.Exception - Exceptions thrown by callback handlers are propagated to the next
deferrable in the chain as the
onErrback error
parameter.
U onErrback(Deferred<T> deferred,
java.lang.Exception error)
throws java.lang.Exception
deferred - This is the deferred event object through which the error callback
was issued.error - This is the Exception object which has been caught on task
failure. It contains information about the cause of the error. It
can be either handled locally or re-thrown to pass it up the
callback chain.
U which will be
propagated to the next deferrable in the chain as the
onCallback data parameter.
java.lang.Exception - Exceptions thrown by error callback handlers are propagated to
the next deferrable in the chain as the
onErrback error
parameter.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||