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 over Command. This is layer 1.
Since:
3.17
Author:
Kohsuke Kawaguchi
See Also:
  • Method Details

    • toString

      public String toString()
      Description copied from class: Command
      Should provide concise information useful for Channel.Listener.
      Specified by:
      toString in class Command
    • 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