public interface ControlChannel
| Modifier and Type | Method and Description |
|---|---|
void |
disableHeartbeat()
Disable any previously enabled heartbeats.
|
void |
enableHeartbeat(long interval,
long timeout,
TimeUnit timeUnit)
Enables sending heartbeat message to validate that the connection to AxonServer is alive.
|
Registration |
registerEventProcessor(String processorName,
Supplier<EventProcessorInfo> infoSupplier,
ProcessorInstructionHandler instructionHandler)
Registers an Event Processor with AxonServer, allowing AxonServer to request status information and provide
instructions for the Processor.
|
Registration |
registerInstructionHandler(PlatformOutboundInstruction.RequestCase type,
InstructionHandler<PlatformOutboundInstruction,PlatformInboundInstruction> handler)
Registers the given
handler to handle a given type of instruction. |
CompletableFuture<Void> |
sendInstruction(PlatformInboundInstruction instruction)
Send a the given
instruction over this channel, returning the acknowledgment of the instruction
asynchronously. |
Registration registerInstructionHandler(PlatformOutboundInstruction.RequestCase type, InstructionHandler<PlatformOutboundInstruction,PlatformInboundInstruction> handler)
handler to handle a given type of instruction. Any previous registrations of
handlers for the given type of instruction are overwritten.
Note that de-registration of a handler will not reinstate any previously registered handler for the same type of instruction.
This method is intended to overwrite the default behavior for incoming instructions, or to provide support for non-default instructions.
type - the type of instructions to handlehandler - the handler to invoke for incoming instructionsRegistration registerEventProcessor(String processorName, Supplier<EventProcessorInfo> infoSupplier, ProcessorInstructionHandler instructionHandler)
processorName - the name of the processorinfoSupplier - supplier for up-to-date status information of the processorinstructionHandler - handler for incoming instructions for the processorvoid enableHeartbeat(long interval,
long timeout,
TimeUnit timeUnit)
When enabled, the client will abandon any connections on which no timely response to a heartbeat has been received. If heartbeats are also enabled on the AxonServer side, any heartbeat initiated by AxonServer will count as a valid connection confirmation.
Consecutive invocations of this method will alter the configuration, resetting heartbeat timers and reinitialize the heartbeat processing.
interval - the interval at which heartbeat messages are expectedtimeout - the maximum time to wait for a confirmation after initiating a heartbeat messagetimeUnit - the unit of time in which interval and timeout are expressedvoid disableHeartbeat()
CompletableFuture<Void> sendInstruction(PlatformInboundInstruction instruction)
instruction over this channel, returning the acknowledgment of the instruction
asynchronously.instruction - the PlatformInboundInstruction to send over this channelCompletableFuture of the acknowledgement of the given instructionCopyright © 2020–2023 AxonIQ BV. All rights reserved.