public class AxonServerConnectionManager extends Object
Channels per context and providing them as the means to dispatch/receive messages.| Modifier and Type | Class and Description |
|---|---|
static class |
AxonServerConnectionManager.Builder
Builder class to instantiate an
AxonServerConnectionManager. |
| Modifier | Constructor and Description |
|---|---|
protected |
AxonServerConnectionManager(AxonServerConnectionManager.Builder builder,
io.axoniq.axonserver.connector.AxonServerConnectionFactory connectionFactory)
Instantiate a
AxonServerConnectionManager based on the fields contained in the AxonServerConnectionManager.Builder, using the
given connectionFactory to obtain connections to AxonServer. |
| Modifier and Type | Method and Description |
|---|---|
static AxonServerConnectionManager.Builder |
builder()
Instantiate a Builder to be able to create an
AxonServerConnectionManager. |
void |
disconnect()
Disconnects any active connections, forcing a new connection to be established when one is requested.
|
void |
disconnect(String context)
Disconnects any active connection for the given
context, forcing a new connection to be established when
one is requested. |
io.grpc.Channel |
getChannel()
Deprecated.
|
io.grpc.Channel |
getChannel(String context)
Deprecated.
|
io.axoniq.axonserver.connector.AxonServerConnection |
getConnection() |
io.axoniq.axonserver.connector.AxonServerConnection |
getConnection(String context) |
String |
getDefaultContext()
Returns the name of the default context of this application.
|
boolean |
isConnected(String context)
Returns
true if a gRPC channel for the specific context is opened between client and AxonServer. |
void |
shutdown()
Stops the Connection Manager, closing any active connections and preventing new connections from being created.
|
protected AxonServerConnectionManager(AxonServerConnectionManager.Builder builder, io.axoniq.axonserver.connector.AxonServerConnectionFactory connectionFactory)
AxonServerConnectionManager based on the fields contained in the AxonServerConnectionManager.Builder, using the
given connectionFactory to obtain connections to AxonServer.builder - the AxonServerConnectionManager.Builder used to instantiate a AxonServerConnectionManager instanceconnectionFactory - a configured instance of the AxonServerConnectionFactorypublic static AxonServerConnectionManager.Builder builder()
AxonServerConnectionManager.
The TagsConfiguration is defaulted to TagsConfiguration.TagsConfiguration() and the ScheduledExecutorService defaults to an instance using a single thread with an AxonThreadFactory tied to
it. The AxonServerConfiguration is a hard requirements and as such should be provided.
AxonServerConnectionManagerpublic io.axoniq.axonserver.connector.AxonServerConnection getConnection()
public io.axoniq.axonserver.connector.AxonServerConnection getConnection(String context)
public boolean isConnected(String context)
true if a gRPC channel for the specific context is opened between client and AxonServer.context - the (Bounded) Context for for which is verified the AxonServer connection through the gRPC
channel@ShutdownHandler(phase=-134217728) public void shutdown()
Phase.EXTERNAL_CONNECTIONS phase.public void disconnect(String context)
context, forcing a new connection to be established when
one is requested.context - the context for which the connection must be disconnectedpublic void disconnect()
public String getDefaultContext()
@Deprecated public io.grpc.Channel getChannel()
@Deprecated public io.grpc.Channel getChannel(String context)
Copyright © 2010–2020. All rights reserved.