Class AxonServerManagedChannel


  • public class AxonServerManagedChannel
    extends io.grpc.ManagedChannel
    AxonServer specific ManagedChannel implementation providing AxonServer specific connection logic.
    • Constructor Detail

      • AxonServerManagedChannel

        public AxonServerManagedChannel​(List<ServerAddress> routingServers,
                                        ReconnectConfiguration reconnectConfiguration,
                                        String context,
                                        ClientIdentification clientIdentification,
                                        ScheduledExecutorService executor,
                                        BiFunction<ServerAddress,​String,​io.grpc.ManagedChannel> connectionFactory)
        Parameters:
        routingServers - List of ServerAddress' denoting the instances to connect with
        reconnectConfiguration - configuration holder defining how this ManagedChannel implementation should reconnect
        context - the context this ManagedChannel operates in
        clientIdentification - the information identifying the client application which is connecting. This information is used to form the connection with a client
        executor - ScheduledExecutorService used to schedule operations to ensure the connection is maintained
        connectionFactory - factory method able of creating new ManagedChannel instances based on a given ServerAddress and context
    • Method Detail

      • shutdown

        public io.grpc.ManagedChannel shutdown()
        Specified by:
        shutdown in class io.grpc.ManagedChannel
      • isShutdown

        public boolean isShutdown()
        Specified by:
        isShutdown in class io.grpc.ManagedChannel
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in class io.grpc.ManagedChannel
      • shutdownNow

        public io.grpc.ManagedChannel shutdownNow()
        Specified by:
        shutdownNow in class io.grpc.ManagedChannel
      • newCall

        public <REQ,​RESP> io.grpc.ClientCall<REQ,​RESP> newCall​(io.grpc.MethodDescriptor<REQ,​RESP> methodDescriptor,
                                                                           io.grpc.CallOptions callOptions)
        Specified by:
        newCall in class io.grpc.Channel
      • authority

        public String authority()
        Specified by:
        authority in class io.grpc.Channel
      • getState

        public io.grpc.ConnectivityState getState​(boolean requestConnection)
        Overrides:
        getState in class io.grpc.ManagedChannel
      • notifyWhenStateChanged

        public void notifyWhenStateChanged​(io.grpc.ConnectivityState source,
                                           Runnable callback)
        Overrides:
        notifyWhenStateChanged in class io.grpc.ManagedChannel
      • resetConnectBackoff

        public void resetConnectBackoff()
        Overrides:
        resetConnectBackoff in class io.grpc.ManagedChannel
      • enterIdle

        public void enterIdle()
        Overrides:
        enterIdle in class io.grpc.ManagedChannel
      • requestReconnect

        public void requestReconnect()
        Requests a dedicated reconnect of this ManagedChannel implementation.
      • isReady

        public boolean isReady()
        Indicates whether the channel is READY, meaning is is connected to an Axon Server instance, and ready to accept calls.
        Returns:
        true if the connection is ready to accept calls, otherwise false