public abstract class AbstractMessageBusBinderPlugin extends AbstractPlugin
Plugin that has common implementation methods to bind/unbind Module's message producers and
consumers to/from MessageBus.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
JOB_CHANNEL_PREFIX |
protected MessageBus |
messageBus |
protected static java.lang.String |
MODULE_INPUT_CHANNEL |
protected static java.lang.String |
MODULE_OUTPUT_CHANNEL |
logger, PLUGIN_CONTEXT_CONFIG_ROOT| Constructor and Description |
|---|
AbstractMessageBusBinderPlugin(MessageBus messageBus) |
AbstractMessageBusBinderPlugin(MessageBus messageBus,
ZooKeeperConnection zkConnection) |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeShutdown(Module module)
Perform any cleanup necessary prior to module shutdown
|
protected void |
bindConsumerAndProducers(Module module)
Bind input/output channel of the module's message consumer/producers to
MessageBus's message
source/target entities. |
protected abstract java.lang.String |
buildTapChannelName(Module module) |
protected java.util.Properties[] |
extractConsumerProducerProperties(Module module) |
protected java.util.Map<java.lang.String,java.lang.Object> |
extractHistoryProperties(Module module) |
protected abstract java.lang.String |
getInputChannelName(Module module) |
int |
getOrder() |
protected abstract java.lang.String |
getOutputChannelName(Module module) |
void |
removeModule(Module module)
Take any actions necessary to remove a module from the system.
|
protected void |
unbindConsumer(Module module)
Unbind the input channel of the module from the
MessageBus
(stop sending new messages to the module so it can be stopped). |
protected void |
unbindProducers(Module module)
Unbind the output channel of the module (and tap if present) from the
MessageBus
(after it has been stopped). |
getApplicationContext, postProcessModule, preProcessModule, setApplicationContext, supportsprotected static final java.lang.String MODULE_INPUT_CHANNEL
protected static final java.lang.String MODULE_OUTPUT_CHANNEL
protected static final java.lang.String JOB_CHANNEL_PREFIX
protected final MessageBus messageBus
public AbstractMessageBusBinderPlugin(MessageBus messageBus)
public AbstractMessageBusBinderPlugin(MessageBus messageBus, ZooKeeperConnection zkConnection)
protected final void bindConsumerAndProducers(Module module)
MessageBus's message
source/target entities. The producer must be bound first so that messages can immediately
start flowing from the consumer.module - the module whose consumer and producers to bind to the MessageBus.protected final java.util.Properties[] extractConsumerProducerProperties(Module module)
protected final java.util.Map<java.lang.String,java.lang.Object> extractHistoryProperties(Module module)
public void beforeShutdown(Module module)
PluginbeforeShutdown in interface PluginbeforeShutdown in class AbstractPluginmodule - the module to cleanuppublic void removeModule(Module module)
PluginremoveModule in interface PluginremoveModule in class AbstractPluginmodule - the module to removeprotected abstract java.lang.String getInputChannelName(Module module)
protected abstract java.lang.String getOutputChannelName(Module module)
protected abstract java.lang.String buildTapChannelName(Module module)
protected void unbindConsumer(Module module)
MessageBus
(stop sending new messages to the module so it can be stopped).module - the module for which the consumer is to be unbound from the MessageBus.protected void unbindProducers(Module module)
MessageBus
(after it has been stopped).module - the module for which producers are to be unbound from the MessageBus.public int getOrder()
getOrder in interface org.springframework.core.OrderedgetOrder in class AbstractPlugin