|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines the behavior an observer of an asynchronous method invocation must have.
This interface provides methods to poll the availability of the result or of the callee thread of the asynchronous call.
Some methods of this interface are safe related meaning the result they return is always valid. Others are unsafe related meaning the validity of their returned value depends on the availability of another result.
This interface provides informations available during the real execution of the specified method.
InvocationInfo,
MethodResult,
InvocationEventsWaiter,
FutureClient| Method Summary | |
ThreadOp |
getCalleeThread()
Deprecated. The usability of the callee thread depends on
the asynchronous policy used by the |
boolean |
isCalleeAvailable()
Deprecated. The usability of the callee thread depends on
the asynchronous policy used by the |
boolean |
isCancelled()
Returns true if the asynchronous method invocation has
been cancelled. |
boolean |
isInterrupted()
Returns true if the asynchronous method invocation has
been interrupted. |
boolean |
isResultAvailable()
Test the usable value of the returned result. |
boolean |
isStarted()
Returns true if the asynchronous method invocation is
started. |
| Method Detail |
public boolean isResultAvailable()
Test the usable value of the returned result. This method is safe related.
While the result is unavailable, this method returns
false and calls to some methods of this class is undefined
as specified in their documentation.
true if the result is availablepublic boolean isCalleeAvailable()
The usability of the callee thread depends on
the asynchronous policy used by the AsynchronousReference
implementation. For example, if a thread-pool is used, the callee thread
returned may be running a completely different method than the one
called. Hence, callee thread use is error prone. No
replacement. Current implementations always return
null. This method will be removed in the next light
release.
Test the usable value of the callee thread. This method is safe related.
While the callee thread as not yet been set by the implementation of
asynchronous method invocation, this method returns
false. Otherwise, it returns true.
This method may return true whereas getCalleeThread() returns a null value. This situation
means that the callee has been set, has executed the method
and is no longer available (it has died for example).
true if the callee thread has been set by the
implementationResultUpdater.setCalleeThread(ThreadOp)public ThreadOp getCalleeThread()
The usability of the callee thread depends on
the asynchronous policy used by the AsynchronousReference
implementation. For example, if a thread-pool is used, the callee thread
returned may be running a completely different method than the one
called. Hence, callee thread use is error prone. No
replacement. Current implementations always return
null. This method will be removed in the next light
release.
Get the thread which is running the method invocation (the "callee"). This method is unsafe related.
While isCalleeAvailable() returns false,
the value returned is undefined. Else, the ThreadOp
instance referencing the thread which is running the method is returned
which can be null if the method is considered
terminated.
ThreadOppublic boolean isStarted()
Returns true if the asynchronous method invocation is
started. This method is safe related
If this method returns false, then the asynchronous
method invocation has not start its execution. Otherwise, the method may
be currently running or terminated.
true if this method has started its execution,
false otherwise.public boolean isCancelled()
Returns true if the asynchronous method invocation has
been cancelled. This method is safe related
boolean valuepublic boolean isInterrupted()
Returns true if the asynchronous method invocation has
been interrupted. This method is safe related
boolean value
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||