Class RequestEnvelope
java.lang.Object
org.opendaylight.controller.cluster.access.concepts.Envelope<Request<?,?>>
org.opendaylight.controller.cluster.access.concepts.RequestEnvelope
- All Implemented Interfaces:
Serializable,Immutable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewSuccessEnvelope(RequestSuccess<?, ?> success, long executionTimeNanos) Creates a successful ResponseEnvelope that wraps the given successful Request response message.voidsendFailure(RequestException cause, long executionTimeNanos) Respond to this envelope with aRequestFailurecaused by specifiedRequestException.voidsendSuccess(RequestSuccess<?, ?> success, long executionTimeNanos) Respond to this envelope with aRequestSuccess.Methods inherited from class org.opendaylight.controller.cluster.access.concepts.Envelope
getMessage, getSessionId, getTxSequence, toString
-
Constructor Details
-
RequestEnvelope
-
-
Method Details
-
sendFailure
Respond to this envelope with aRequestFailurecaused by specifiedRequestException.- Parameters:
cause- Cause of thisRequestFailureexecutionTimeNanos- Time to execute the request, in nanoseconds- Throws:
NullPointerException- if cause is null
-
sendSuccess
Respond to this envelope with aRequestSuccess.- Parameters:
success- Successful response- Throws:
NullPointerException- if success is null
-
newSuccessEnvelope
Creates a successful ResponseEnvelope that wraps the given successful Request response message.- Parameters:
success- the successful Request response messageexecutionTimeNanos- the execution time of the request- Returns:
- a
ResponseEnvelopeinstance
-