Class ContextConnection

  • All Implemented Interfaces:
    AxonServerConnection

    public class ContextConnection
    extends Object
    implements AxonServerConnection
    Implementation of the AxonServerConnection, carrying context information with the overall connection. The context information can be used to support the notion of bounded contexts or multi-tenancy for example.
    • Constructor Detail

      • ContextConnection

        public ContextConnection​(ClientIdentification clientIdentification,
                                 ScheduledExecutorService executorService,
                                 AxonServerManagedChannel connection,
                                 long processorInfoUpdateFrequency,
                                 int commandPermits,
                                 int queryPermits,
                                 String context,
                                 Consumer<ContextConnection> onShutdown)
        Construct a ContextConnection carrying context information.
        Parameters:
        clientIdentification - client information identifying whom has connected. This information is used to pass on to message
        executorService - a ScheduledExecutorService used to schedule reconnects in the channels this connection provides
        connection - the AxonServerManagedChannel used to form the connections with AxonServer
        processorInfoUpdateFrequency - the update frequency in milliseconds of event processor information
        commandPermits - the number of permits for command streams
        queryPermits - the number of permits for query streams
        context - the context this connection belongs to
        onShutdown - a shutdown hook to invoke whenever this ContextConnection disconnects