public class AxonServerConnectionFactory extends Object
Channels per context and providing them as the means to dispatch/receive messages.| Modifier and Type | Class and Description |
|---|---|
static class |
AxonServerConnectionFactory.Builder
Builder for AxonServerConnectionFactory instances.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AxonServerConnectionFactory(AxonServerConnectionFactory.Builder builder)
Instantiates an
AxonServerConnectionFactory with the given builder. |
| Modifier and Type | Method and Description |
|---|---|
AxonServerConnection |
connect(String context)
Connects to the given
context using the settings defined in this ConnectionFactory. |
static AxonServerConnectionFactory.Builder |
forClient(String componentName)
Returns a builder to configure a ConnectionFactory instance for the given
componentName. |
static AxonServerConnectionFactory.Builder |
forClient(String componentName,
String clientInstanceId)
Returns a builder to configure a ConnectionFactory instance for the given
componentName and clientInstanceId. |
void |
shutdown()
Shuts down the connector, disconnecting from all contexts.
|
protected AxonServerConnectionFactory(AxonServerConnectionFactory.Builder builder)
AxonServerConnectionFactory with the given builder.builder - the AxonServerConnectionFactory.Builder used to set all the specifics of an AxonServerConnectionFactorypublic static AxonServerConnectionFactory.Builder forClient(String componentName)
componentName.
A unique clientInstanceId will be generated for this component. The componentName is used in monitoring information and should be the same only for instances of the same application or component.
componentName - The name of the component connecting to AxonServerforClient(String, String)public static AxonServerConnectionFactory.Builder forClient(String componentName, String clientInstanceId)
componentName and clientInstanceId.
The clientInstanceId MUST be a unique value across all instances that connect to AxonServer. The componentName is used in monitoring information and should be the same only for instances of the same application or component.
Where possible, it is preferable that the clientInstanceId remains the same across restarts of a
component instance.
componentName - The name of the component connecting to AxonServerclientInstanceId - The unique instance identifier for this instance of the componentforClient(String)public AxonServerConnection connect(String context)
context using the settings defined in this ConnectionFactory.context - The name of the context to connect topublic void shutdown()
In case where regular reconnection is required, consider using AxonServerConnection.disconnect() on the
connections created by this factory instead.
AxonServerConnection.disconnect()Copyright © 2020–2022 AxonIQ BV. All rights reserved.