Class ClientActorBehavior<T extends BackendInfo>

    • Method Detail

      • haltClient

        protected abstract void haltClient​(@NonNull Throwable cause)
        Halt And Catch Fire. Halt processing on this client. Implementations need to ensure they initiate state flush procedures. No attempt to use this instance should be made after this method returns. Any such use may result in undefined behavior.
        Parameters:
        cause - Failure cause
      • onCommand

        protected abstract @Nullable ClientActorBehavior<T> onCommand​(@NonNull Object command)
        Override this method to handle any command which is not handled by the base behavior.
        Parameters:
        command - the command to process
        Returns:
        Next behavior to use, null if this actor should shut down.
      • resolver

        protected final @NonNull BackendInfoResolver<T> resolver()
        Override this method to provide a backend resolver instance.
        Returns:
        a backend resolver instance
      • connectionUp

        @Holding("connectionsLock")
        protected abstract @NonNull ClientActorBehavior.ConnectionConnectCohort connectionUp​(@NonNull ConnectedClientConnection<T> newConn)
        Callback invoked when a new connection has been established. Implementations are expected perform preparatory tasks before the previous connection is frozen.
        Parameters:
        newConn - New connection
        Returns:
        ConnectionConnectCohort which will be used to complete the process of bringing the connection up.