Class ConnectClientSuccess

All Implemented Interfaces:
Serializable, Immutable

public final class ConnectClientSuccess extends RequestSuccess<ClientIdentifier,ConnectClientSuccess>
Successful reply to an ConnectClientRequest. Client actor which initiated this connection should use the version reported via Message.getVersion() of this message to communicate with this backend. Should this backend fail, the client can try accessing the provided alternates.
See Also:
  • Constructor Details

    • ConnectClientSuccess

      public ConnectClientSuccess(@NonNull ClientIdentifier target, long sequence, @NonNull org.apache.pekko.actor.ActorRef backend, @NonNull List<org.apache.pekko.actor.ActorSelection> alternates, @NonNull ReadOnlyDataTree dataTree, int maxMessages)
  • Method Details

    • getAlternates

      public @NonNull List<org.apache.pekko.actor.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 org.apache.pekko.actor.ActorRef getBackend()
    • getDataTree

      public Optional<ReadOnlyDataTree> getDataTree()
    • getMaxMessages

      public int getMaxMessages()
    • externalizableProxy

      protected org.opendaylight.controller.cluster.access.commands.ConnectClientSuccess.SerialForm externalizableProxy(ABIVersion version)
      Description copied from class: Message
      Instantiate a serialization proxy for this object for the target ABI version. Implementations should return different objects for incompatible ABIVersions. This method should never fail, as any compatibility checks should have been done by Message.cloneAsVersion(ABIVersion).
      Specified by:
      externalizableProxy in class Message<ClientIdentifier,ConnectClientSuccess>
      Parameters:
      version - Requested ABI version
      Returns:
      Proxy for this object
    • cloneAsVersion

      protected ConnectClientSuccess cloneAsVersion(ABIVersion version)
      Description copied from class: Message
      Create 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 of Message(Message, ABIVersion).
      Specified by:
      cloneAsVersion in class Message<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: Message
      Add attributes to the output of Message.toString(). Subclasses wanting to contribute additional information should override this method. Any null attributes will be omitted from the output.
      Overrides:
      addToStringAttributes in class Message<ClientIdentifier,ConnectClientSuccess>
      Parameters:
      toStringHelper - a MoreObjects.ToStringHelper instance
      Returns:
      The MoreObjects.ToStringHelper passed in as argument