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.void
sendFailure
(RequestException cause, long executionTimeNanos) Respond to this envelope with aRequestFailure
caused by specifiedRequestException
.void
sendSuccess
(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 aRequestFailure
caused by specifiedRequestException
.- Parameters:
cause
- Cause of thisRequestFailure
executionTimeNanos
- 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
ResponseEnvelope
instance
-