public interface ExecutorBusProcessor
An executor bus processor is responsible for performing processing on
message sent through the bus and 'acknowledging' the completion of that
processing via the supplied ExecutorBusProcessor.Acknowledger
.
A processor that opens resources to external systems to do its processing
may want to implement LifecycleAwareExecutorBusProcessor
to hook
into the bus's lifecycle.
Modifier and Type | Interface and Description |
---|---|
static interface |
ExecutorBusProcessor.Acknowledger
An Acknowledger allows processors that perform work in another thread
to asynchronously acknowledge completion of that work.
|
Modifier and Type | Method and Description |
---|---|
void |
process(MessageView view,
ExecutorBusProcessor.Acknowledger acknowledger,
int flags)
Called by the executor bus to process a message sent through the executor bus.
|
void process(MessageView view, ExecutorBusProcessor.Acknowledger acknowledger, int flags) throws Exception
The implementer may perform the send in the thread calling this method or pass the message off to a thread pool that it manages for greater parallelism.
Users of an executor bus should be able to expect ordered processing of messages
on a per channel basis, so implementations that are perform processing on multiple
threads are encourage to call MessageView.getMessageChannel()
to determine
the execution channel and process accordingly.
view
- The view to send.acknowledger
- The acknowledger or null
if no acknowledgement is required for processing this message.flags
- Flags provided by the executor bus as hints to the processor.Exception
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.