public class EventProcessorControlService extends Object implements Lifecycle
PlatformOutboundInstruction
s to control EventProcessor
s when for example
requested by Axon Server. Will delegate the calls to the AxonServerConnectionManager
for further processing.Modifier and Type | Class and Description |
---|---|
protected static class |
EventProcessorControlService.AxonProcessorInstructionHandler |
Lifecycle.LifecycleHandler, Lifecycle.LifecycleRegistry
Modifier and Type | Field and Description |
---|---|
protected AxonServerConnectionManager |
axonServerConnectionManager |
protected String |
context |
protected EventProcessingConfiguration |
eventProcessingConfiguration |
Constructor and Description |
---|
EventProcessorControlService(AxonServerConnectionManager axonServerConnectionManager,
EventProcessingConfiguration eventProcessingConfiguration,
AxonServerConfiguration axonServerConfiguration)
Initialize a
EventProcessorControlService which adds Consumer s to the given
AxonServerConnectionManager on PlatformOutboundInstruction s. |
EventProcessorControlService(AxonServerConnectionManager axonServerConnectionManager,
EventProcessingConfiguration eventProcessingConfiguration,
String context)
Initialize a
EventProcessorControlService which adds Consumer s to the given
AxonServerConnectionManager on PlatformOutboundInstruction s. |
Modifier and Type | Method and Description |
---|---|
Supplier<io.axoniq.axonserver.grpc.control.EventProcessorInfo> |
infoSupplier(EventProcessor processor) |
void |
registerLifecycleHandlers(Lifecycle.LifecycleRegistry lifecycle)
Registers the activities to be executed in the various phases of an application's lifecycle.
|
void |
start()
|
protected final AxonServerConnectionManager axonServerConnectionManager
protected final EventProcessingConfiguration eventProcessingConfiguration
protected final String context
public EventProcessorControlService(AxonServerConnectionManager axonServerConnectionManager, EventProcessingConfiguration eventProcessingConfiguration, AxonServerConfiguration axonServerConfiguration)
EventProcessorControlService
which adds Consumer
s to the given
AxonServerConnectionManager
on PlatformOutboundInstruction
s. Uses the AxonServerConnectionManager.getDefaultContext()
specified in the given axonServerConnectionManager
as
the context to dispatch operations inaxonServerConnectionManager
- a AxonServerConnectionManager
used to add operations when PlatformOutboundInstruction
have been receivedaxonServerConfiguration
- the AxonServerConfiguration
used to retrieve the client identifierpublic EventProcessorControlService(AxonServerConnectionManager axonServerConnectionManager, EventProcessingConfiguration eventProcessingConfiguration, String context)
EventProcessorControlService
which adds Consumer
s to the given
AxonServerConnectionManager
on PlatformOutboundInstruction
s. Uses the AxonServerConnectionManager.getDefaultContext()
specified in the given axonServerConnectionManager
as
the context to dispatch operations inaxonServerConnectionManager
- a AxonServerConnectionManager
used to add operations when PlatformOutboundInstruction
have been receivedcontext
- the context of this application instance within which outbound instruction
handlers should be specified on the given axonServerConnectionManager
public void registerLifecycleHandlers(@Nonnull Lifecycle.LifecycleRegistry lifecycle)
Lifecycle
registerLifecycleHandlers
in interface Lifecycle
lifecycle
- the lifecycle instance to register the handlers withLifecycle.LifecycleRegistry.onShutdown(int, Runnable)
,
LifecycleRegistry#onShutdown(int, LifecycleHandler)
,
Lifecycle.LifecycleRegistry.onStart(int, Runnable)
,
LifecycleRegistry#onStart(int, LifecycleHandler)
public void start()
Consumer
s to the AxonServerConnectionManager
for several PlatformOutboundInstruction
s. Will be started in phase Phase.INBOUND_EVENT_CONNECTORS
, to ensure the
event processors this service provides control over have been started.public Supplier<io.axoniq.axonserver.grpc.control.EventProcessorInfo> infoSupplier(EventProcessor processor)
Copyright © 2010–2023. All rights reserved.