Interface RemoteResult<T>
-
public interface RemoteResult<T>
Object containing a request return result for an individual node.
-
-
Field Summary
Fields Modifier and Type Field Description static Object
NULL_RESULT
Value used bygetResult()
as a success value in the case where the target node returned anull
response to the request.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getNodeID()
Get the node ID of the node where this result has come from.com.opencloud.util.Fallible<T,RemoteException>
getResult()
Get the return result for a request send to the node given bygetRhinoNodeID()
.String
getRhinoNodeID()
Get the node ID of the node where this result has come from.boolean
isResultAvailable()
Determine if a result is available yet for the node given bygetRhinoNodeID()
.
-
-
-
Field Detail
-
NULL_RESULT
static final Object NULL_RESULT
Value used by
getResult()
as a success value in the case where the target node returned anull
response to the request.
-
-
Method Detail
-
getNodeID
int getNodeID()
Get the node ID of the node where this result has come from.
This method returns the node ID in the legacy numeric form. For new work, it is recommended to use
getRhinoNodeID()
instead.- Returns:
- the node ID of the node where this result has come from.
-
getRhinoNodeID
String getRhinoNodeID()
Get the node ID of the node where this result has come from. This method returns the node ID in string form.
- Returns:
- the node ID of the node where this result has come from.
- Since:
- Rhino 3.2
-
isResultAvailable
boolean isResultAvailable()
Determine if a result is available yet for the node given by
getRhinoNodeID()
. For a synchronous invocation, this method always returnstrue
.- Returns:
true
if a result has been obtained for the invocation on the specified node,false
if the invocation result is still pending.
-
getResult
com.opencloud.util.Fallible<T,RemoteException> getResult()
Get the return result for a request send to the node given by
getRhinoNodeID()
. If the result is not yet available, this method blocks until the result is received. If the invocation succeeded and returnednull
, the value returned from thisFallible
isNULL_RESULT
(Fallible
disallows null result values). If the invocation failed, theRemoteException
obtained from thisFallible
contains the exception thrown by the remote node as the cause, which may includeNoListenerException
if no listener was registered to receive the request on the node.- Returns:
- the return result for the request.
-
-