|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--springs.communication.FutureResult
A placeholder for a future result of a message or asynchronous operation.
Field Summary | |
private java.lang.String |
_agentName
The name of the agent. |
private java.lang.Object[] |
_args
The arguments of the method to invoke. |
private boolean |
_cacheRef
A boolean indicating whether a reference to the target agent should be cached. |
private java.lang.String |
_caller
The name of the caller agent. |
private java.lang.Exception |
_error
A possible error thrown during the execution of the asynchronous operation. |
private java.lang.String |
_methodName
The name of the method to invoke. |
private java.lang.Object |
_result
The result from the invocation. |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
FutureResult(java.lang.String agentName,
java.lang.String methodName,
java.lang.Object[] args,
boolean cacheRef,
java.lang.String caller)
Constructor. |
Method Summary | |
java.lang.Exception |
getError()
Obtains the error that took place during the execution of the asynchronous operation. |
java.lang.Object |
getResult()
Obtains the result. |
boolean |
isResultAvailable()
Checks whether there is a result available. |
boolean |
isSuccessful()
Checks if the asynchronous operation was completed successfully. |
void |
run()
The main method. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.Object _result
String
private java.lang.String _methodName
String
private java.lang.Object[] _args
Object
private java.lang.Exception _error
Exception
private java.lang.String _agentName
String
private boolean _cacheRef
private java.lang.String _caller
String
Constructor Detail |
public FutureResult(java.lang.String agentName, java.lang.String methodName, java.lang.Object[] args, boolean cacheRef, java.lang.String caller)
agentName
- the agent's name.methodName
- the name of the method to invoke.args
- the arguments of the method.cacheRef
- a boolean indicating whether a reference to the target agent should be cached.caller
- the name of the caller agent.String
,
Object
Method Detail |
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public java.lang.Object getResult()
Object
public java.lang.Exception getError()
Exception
public boolean isSuccessful()
public boolean isResultAvailable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |