|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the behavior a waiter of an asynchronous method invocation must have.
This interface provides methods to wait for the start of the method invocation, and for the availability of the result.
Every methods of this interface are safe related meaning
the result they return is always valid.
InvocationInfo
,
InvocationObserver
,
MethodResult
,
FutureClient
Method Summary | |
ThreadOp |
waitForCalleeThread()
Deprecated. The usability of the callee thread depends on
the asynchronous policy used by the |
ThreadOp |
waitForCalleeThread(long timeout)
Deprecated. The usability of the callee thread depends on
the asynchronous policy used by the |
java.lang.Object |
waitForResult()
Equivalent to waitForResult(Long.MAX_VALUE). |
java.lang.Object |
waitForResult(long timeout)
Wait for the availability of the result of an asynchronous method invocation for a specified amount of time. |
void |
waitUntilCalleeAvailable()
Deprecated. The usability of the callee thread depends on
the asynchronous policy used by the |
boolean |
waitUntilCalleeAvailable(long timeout)
Deprecated. The usability of the callee thread depends on
the asynchronous policy used by the |
void |
waitUntilResultAvailable()
Wait until the result become available. |
boolean |
waitUntilResultAvailable(long timeout)
Wait until the result become available for a specified amount of time. |
void |
waitUntilStarted()
Wait until the method is runned by a callee thread. |
boolean |
waitUntilStarted(long timeout)
Wait until the method is runned by a callee thread. |
Method Detail |
public java.lang.Object waitForResult() throws java.lang.Throwable, java.lang.InterruptedException
Equivalent to waitForResult(Long.MAX_VALUE). This method is
safe related.
java.lang.Throwable
- the exception thrown by the asynchronous method
invocation.
java.lang.InterruptedException
- if the thread has been interruptedpublic java.lang.Object waitForResult(long timeout) throws java.lang.Throwable, java.lang.InterruptedException, TimedOutException
Wait for the availability of the result of an asynchronous method invocation for a specified amount of time. This method is safe related.
If an exception occured during the call, it is thrown.
If the specified timeout
expires, a
TimedOutException
is thrown.
java.lang.Throwable
- The exception thrown by the asynchronous method
invocation.
java.lang.InterruptedException
- if another thread has interrupted the
current thread. The interrupted status of the current thread is cleared
when this exception is thrown.
TimedOutException
- if the specified timeout
expires.public boolean waitUntilResultAvailable(long timeout) throws java.lang.InterruptedException
Wait until the result become available for a specified amount of time. This method is safe related.
If the result is not available, wait timeout
before
returning.
timeout
- the maximum time to wait in milliseconds.
java.lang.InterruptedException
public void waitUntilResultAvailable() throws java.lang.InterruptedException
Wait until the result become available. This method is safe related.
java.lang.InterruptedException
public boolean waitUntilCalleeAvailable(long timeout) throws java.lang.InterruptedException
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 return false
immediatly. This method will be removed in the next light release.
Wait until the callee thread become available for a specified amount of time. This method is safe related.
If the callee is not available, wait timeout
before
returning.
timeout
- the maximum time to wait in milliseconds (0 means wait
for ever).
java.lang.InterruptedException
public void waitUntilCalleeAvailable() throws java.lang.InterruptedException
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 return immediatly. This method will
be removed in the next light release.
Wait until the callee thread become available. This method is safe related.
java.lang.InterruptedException
public ThreadOp waitForCalleeThread(long timeout) throws TimedOutException, java.lang.InterruptedException
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 return null
immediatly. This method will be removed in the next light release.
Wait for the thread which is running the method invocation (the "callee") to be set for a specified amount of time. This method is safe related.
If the callee has not yet been set, wait timeout
before
returning the result.
timeout
- the maximum time to wait in milliseconds (0 means wait
for ever).
java.lang.InterruptedException
- if another thread has interrupted the
current thread. The interrupted status of the current thread is cleared
when this exception is thrown.
TimedOutException
public ThreadOp waitForCalleeThread() throws java.lang.InterruptedException
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 return null
immediatly. This method will be removed in the next light release.
Wait for the thread which is running the method invocation (the "callee") to be set. This method is safe related.
java.lang.InterruptedException
- if another thread has interrupted the
current thread. The interrupted status of the current thread is cleared
when this exception is thrown.public void waitUntilStarted() throws java.lang.InterruptedException
Wait until the method is runned by a callee thread. This method is safe related.
java.lang.InterruptedException
public boolean waitUntilStarted(long timeout) throws java.lang.InterruptedException
Wait until the method is runned by a callee thread. This method is safe related.
If the invocation has not yet started, wait timeout
before returning.
timeout
- the maximum time to wait in milliseconds.
java.lang.InterruptedException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |