Class ConnectClientSuccess
- java.lang.Object
-
- org.opendaylight.controller.cluster.access.concepts.Message<T,C>
-
- org.opendaylight.controller.cluster.access.concepts.Response<T,C>
-
- org.opendaylight.controller.cluster.access.concepts.RequestSuccess<ClientIdentifier,ConnectClientSuccess>
-
- org.opendaylight.controller.cluster.access.commands.ConnectClientSuccess
-
- All Implemented Interfaces:
Serializable,Immutable,MutationBehaviour<Immutable>
@Beta public final class ConnectClientSuccess extends RequestSuccess<ClientIdentifier,ConnectClientSuccess>
Successful reply to anConnectClientRequest. Client actor which initiated this connection should use the version reported viaMessage.getVersion()of this message to communicate with this backend. Should this backend fail, the client can try accessing the provided alternates.- Author:
- Robert Varga
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConnectClientSuccess(@NonNull ClientIdentifier target, long sequence, @NonNull ActorRef backend, @NonNull List<ActorSelection> alternates, @NonNull ReadOnlyDataTree dataTree, int maxMessages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MoreObjects.ToStringHelperaddToStringAttributes(MoreObjects.ToStringHelper toStringHelper)Add attributes to the output ofMessage.toString().protected ConnectClientSuccesscloneAsVersion(ABIVersion version)Create a copy of this message which will serialize to a stream corresponding to the specified method.protected org.opendaylight.controller.cluster.access.commands.ConnectClientSuccessProxyV1externalizableProxy(ABIVersion version)@NonNull List<ActorSelection>getAlternates()Return the list of known alternate backends.@NonNull ActorRefgetBackend()Optional<ReadOnlyDataTree>getDataTree()intgetMaxMessages()-
Methods inherited from class org.opendaylight.controller.cluster.access.concepts.Message
getSequence, getTarget, getVersion, toString, toVersion, writeReplace
-
-
-
-
Constructor Detail
-
ConnectClientSuccess
public ConnectClientSuccess(@NonNull ClientIdentifier target, long sequence, @NonNull ActorRef backend, @NonNull List<ActorSelection> alternates, @NonNull ReadOnlyDataTree dataTree, int maxMessages)
-
-
Method Detail
-
getAlternates
public @NonNull List<ActorSelection> getAlternates()
Return the list of known alternate backends. The client can use this list to perform recovery procedures.- Returns:
- a list of known backend alternates
-
getBackend
public @NonNull ActorRef getBackend()
-
getDataTree
public Optional<ReadOnlyDataTree> getDataTree()
-
getMaxMessages
public int getMaxMessages()
-
externalizableProxy
protected org.opendaylight.controller.cluster.access.commands.ConnectClientSuccessProxyV1 externalizableProxy(ABIVersion version)
- Specified by:
externalizableProxyin classRequestSuccess<ClientIdentifier,ConnectClientSuccess>
-
cloneAsVersion
protected ConnectClientSuccess cloneAsVersion(ABIVersion version)
Description copied from class:MessageCreate a copy of this message which will serialize to a stream corresponding to the specified method. This method should be implemented by the concrete final message class and should invoke the equivalent ofMessage(Message, ABIVersion).- Specified by:
cloneAsVersionin classMessage<ClientIdentifier,ConnectClientSuccess>- Parameters:
version- target ABI version- Returns:
- A message with the specified serialization stream
-
addToStringAttributes
protected MoreObjects.ToStringHelper addToStringAttributes(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.- Overrides:
addToStringAttributesin classMessage<ClientIdentifier,ConnectClientSuccess>- Parameters:
toStringHelper- aMoreObjects.ToStringHelperinstance- Returns:
- The
MoreObjects.ToStringHelperpassed in as argument
-
-