public class AxonServerManagedChannel
extends io.grpc.ManagedChannel
ManagedChannel implementation providing AxonServer specific connection logic.| Constructor and Description |
|---|
AxonServerManagedChannel(List<ServerAddress> routingServers,
ReconnectConfiguration reconnectConfiguration,
String context,
ClientIdentification clientIdentification,
ScheduledExecutorService executor,
BiFunction<ServerAddress,String,io.grpc.ManagedChannel> connectionFactory)
Constructs a
AxonServerManagedChannel. |
| Modifier and Type | Method and Description |
|---|---|
String |
authority() |
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
void |
enterIdle() |
io.grpc.ConnectivityState |
getState(boolean requestConnection) |
boolean |
isReady()
Indicates whether the channel is READY, meaning is is connected to an Axon Server instance,
and ready to accept calls.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
<REQ,RESP> io.grpc.ClientCall<REQ,RESP> |
newCall(io.grpc.MethodDescriptor<REQ,RESP> methodDescriptor,
io.grpc.CallOptions callOptions) |
void |
notifyWhenStateChanged(io.grpc.ConnectivityState source,
Runnable callback) |
void |
requestReconnect()
Requests a dedicated reconnect of this
ManagedChannel implementation. |
void |
resetConnectBackoff() |
io.grpc.ManagedChannel |
shutdown() |
io.grpc.ManagedChannel |
shutdownNow() |
public AxonServerManagedChannel(List<ServerAddress> routingServers, ReconnectConfiguration reconnectConfiguration, String context, ClientIdentification clientIdentification, ScheduledExecutorService executor, BiFunction<ServerAddress,String,io.grpc.ManagedChannel> connectionFactory)
AxonServerManagedChannel.routingServers - List of ServerAddress' denoting the instances to connect withreconnectConfiguration - configuration holder defining how this ManagedChannel implementation should
reconnectcontext - the context this ManagedChannel operates inclientIdentification - the information identifying the client application which is connecting. This
information is used to form the connection with a clientexecutor - ScheduledExecutorService used to schedule operations to ensure the
connection is maintainedconnectionFactory - factory method able of creating new ManagedChannel instances based on a
given ServerAddress and contextpublic io.grpc.ManagedChannel shutdown()
shutdown in class io.grpc.ManagedChannelpublic boolean isShutdown()
isShutdown in class io.grpc.ManagedChannelpublic boolean isTerminated()
isTerminated in class io.grpc.ManagedChannelpublic io.grpc.ManagedChannel shutdownNow()
shutdownNow in class io.grpc.ManagedChannelpublic boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination in class io.grpc.ManagedChannelInterruptedExceptionpublic <REQ,RESP> io.grpc.ClientCall<REQ,RESP> newCall(io.grpc.MethodDescriptor<REQ,RESP> methodDescriptor,
io.grpc.CallOptions callOptions)
newCall in class io.grpc.Channelpublic String authority()
authority in class io.grpc.Channelpublic io.grpc.ConnectivityState getState(boolean requestConnection)
getState in class io.grpc.ManagedChannelpublic void notifyWhenStateChanged(io.grpc.ConnectivityState source,
Runnable callback)
notifyWhenStateChanged in class io.grpc.ManagedChannelpublic void resetConnectBackoff()
resetConnectBackoff in class io.grpc.ManagedChannelpublic void enterIdle()
enterIdle in class io.grpc.ManagedChannelpublic void requestReconnect()
ManagedChannel implementation.public boolean isReady()
true if the connection is ready to accept calls, otherwise falseCopyright © 2020–2023 AxonIQ BV. All rights reserved.