Class Request<T extends org.opendaylight.yangtools.concepts.WritableIdentifier,C extends Request<T,C>>
java.lang.Object
org.opendaylight.controller.cluster.access.concepts.Message<T,C>
org.opendaylight.controller.cluster.access.concepts.Request<T,C>
- Type Parameters:
T- Target identifier typeC- Message type
- All Implemented Interfaces:
Serializable,org.opendaylight.yangtools.concepts.Immutable
- Direct Known Subclasses:
ConnectClientRequest,LocalHistoryRequest,TransactionRequest
public abstract class Request<T extends org.opendaylight.yangtools.concepts.WritableIdentifier,C extends Request<T,C>>
extends Message<T,C>
A request message concept. Upon receipt of this message, the recipient will respond with either
a
RequestSuccess or a RequestFailure message.- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRequest(@NonNull C request, @NonNull ABIVersion version) protected -
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.common.base.MoreObjects.ToStringHelperaddToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper) Add attributes to the output ofMessage.toString().protected abstract Request.SerialForm<T,C> externalizableProxy(ABIVersion version) Instantiate a serialization proxy for this object for the target ABI version.final @NonNull akka.actor.ActorRefReturn the return address where responses to this request should be directed to.abstract @NonNull RequestFailure<T,?> toRequestFailure(@NonNull RequestException cause) Return aRequestFailurefor this request, caused by aRequestException.Methods inherited from class org.opendaylight.controller.cluster.access.concepts.Message
cloneAsVersion, getSequence, getTarget, getVersion, throwNSE, toString, toVersion, writeReplace
-
Constructor Details
-
Request
-
Request
-
-
Method Details
-
getReplyTo
public final @NonNull akka.actor.ActorRef getReplyTo()Return the return address where responses to this request should be directed to.- Returns:
- Original requestor
-
toRequestFailure
Return aRequestFailurefor this request, caused by aRequestException.- Parameters:
cause- Failure cause- Returns:
RequestFailurecorresponding to this request
-
addToStringAttributes
protected com.google.common.base.MoreObjects.ToStringHelper addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper) Description copied from class:MessageAdd attributes to the output ofMessage.toString(). Subclasses wanting to contribute additional information should override this method. Any null attributes will be omitted from the output. -
externalizableProxy
Description copied from class:MessageInstantiate a serialization proxy for this object for the target ABI version. Implementations should return different objects for incompatibleABIVersions. This method should never fail, as any compatibility checks should have been done byMessage.cloneAsVersion(ABIVersion).
-