java.lang.Object
org.opendaylight.controller.cluster.access.concepts.Envelope<Request<?,?>>
org.opendaylight.controller.cluster.access.concepts.RequestEnvelope
All Implemented Interfaces:
Serializable, Immutable

public final class RequestEnvelope extends Envelope<Request<?,?>>
See Also:
  • Constructor Details

    • RequestEnvelope

      public RequestEnvelope(Request<?,?> message, long sessionId, long txSequence)
  • Method Details

    • sendFailure

      public void sendFailure(RequestException cause, long executionTimeNanos)
      Respond to this envelope with a RequestFailure caused by specified RequestException.
      Parameters:
      cause - Cause of this RequestFailure
      executionTimeNanos - Time to execute the request, in nanoseconds
      Throws:
      NullPointerException - if cause is null
    • sendSuccess

      public void sendSuccess(RequestSuccess<?,?> success, long executionTimeNanos)
      Respond to this envelope with a RequestSuccess.
      Parameters:
      success - Successful response
      Throws:
      NullPointerException - if success is null
    • newSuccessEnvelope

      public ResponseEnvelope<?> newSuccessEnvelope(RequestSuccess<?,?> success, long executionTimeNanos)
      Creates a successful ResponseEnvelope that wraps the given successful Request response message.
      Parameters:
      success - the successful Request response message
      executionTimeNanos - the execution time of the request
      Returns:
      a ResponseEnvelope instance