Package hudson.remoting
Class Response<RSP extends Serializable,EXC extends Throwable>
- java.lang.Object
-
- hudson.remoting.Command
-
- hudson.remoting.Response<RSP,EXC>
-
- All Implemented Interfaces:
Serializable
public final class Response<RSP extends Serializable,EXC extends Throwable> extends Command
Request/response pattern overCommand
. This is layer 1.- Since:
- 3.17
- Author:
- Kohsuke Kawaguchi
- See Also:
Request
, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EXC
getException()
Gets the exception thrown by the response.Request<?,?>
getRequest()
Obtains the matching request.RSP
getReturnValue()
Gets the return value of the response.long
getTotalTime()
Gets the total time taken on the local side to send the request and receive the response.String
toString()
Should provide concise information useful forChannel.Listener
.-
Methods inherited from class hudson.remoting.Command
getCreationStackTrace, readFrom
-
-
-
-
Method Detail
-
toString
public String toString()
Description copied from class:Command
Should provide concise information useful forChannel.Listener
.
-
getRequest
@CheckForNull public Request<?,?> getRequest()
Obtains the matching request.- Returns:
- null if this response has not been processed successfully
-
getReturnValue
@NonNull public RSP getReturnValue()
Gets the return value of the response.- Returns:
- null in case
getException()
is non-null
-
getException
@NonNull public EXC getException()
Gets the exception thrown by the response.- Returns:
- null in case
getReturnValue()
is non-null
-
getTotalTime
public long getTotalTime()
Gets the total time taken on the local side to send the request and receive the response.- Returns:
- the total time in nanoseconds, or zero if unknown, including if this response is being sent to a remote request
-
-