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 |
protected static java.lang.String |
TAP_CHANNEL_PREFIX |
protected static java.lang.String |
TOPIC_CHANNEL_PREFIX |
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 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, supports
protected static final java.lang.String MODULE_INPUT_CHANNEL
protected static final java.lang.String MODULE_OUTPUT_CHANNEL
protected static final java.lang.String TAP_CHANNEL_PREFIX
protected static final java.lang.String TOPIC_CHANNEL_PREFIX
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.module
- the module whose consumer and producers to bind to the MessageBus
.protected final java.util.Properties[] extractConsumerProducerProperties(Module module)
public void beforeShutdown(Module module)
Plugin
beforeShutdown
in interface Plugin
beforeShutdown
in class AbstractPlugin
module
- the module to cleanuppublic void removeModule(Module module)
Plugin
removeModule
in interface Plugin
removeModule
in class AbstractPlugin
module
- 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.Ordered
getOrder
in class AbstractPlugin