public abstract class CallResult extends Object implements Serializable
This is an abstract class. Service callers return a
specific kind of result, which is derived from this class.
| Modifier | Constructor and Description |
|---|---|
protected |
CallResult(CallRequest request,
TargetDescriptor succeededTarget,
long duration,
List<CallException> exceptions)
Constructs a new
CallResult object. |
| Modifier and Type | Method and Description |
|---|---|
long |
getDuration()
Returns the call duration, in milliseconds.
|
List<CallException> |
getExceptions()
Returns the list of
CallExceptions. |
CallRequest |
getRequest()
Returns the call request.
|
TargetDescriptor |
getSucceededTarget()
Returns the target for which the call succeeded.
|
protected CallResult(CallRequest request, TargetDescriptor succeededTarget, long duration, List<CallException> exceptions) throws IllegalArgumentException
CallResult object.request - the call request that resulted in this result, cannot be
null.succeededTarget - the target for which the call succeeded, cannot be null.duration - the call duration in milliseconds, cannot be a negative number.exceptions - the list of CallExceptions, or null if the first
call attempt succeeded.IllegalArgumentException - if request == null
|| succeededTarget == null
|| duration < 0L.public final CallRequest getRequest()
CallRequest, never null.public final TargetDescriptor getSucceededTarget()
TargetDescriptor for which the call succeeded, not
null.public final long getDuration()
public final List<CallException> getExceptions()
CallExceptions.CallExceptions, collected in a CallExceptionList
object, or null if the first call attempt succeeded.See http://www.xins.org/.