public abstract class AggregatingConsumerImpl<E extends AggregatingConsumeService> extends java.lang.Object implements AggregatingConsumer<E>
AggregatingConsumer
implementations.Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
Constructor and Description |
---|
AggregatingConsumerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the component.
|
ConsumeDestinationGenerator |
getDestination() |
MessageAggregator |
getMessageAggregator() |
void |
init()
Initialises the component.
|
protected static void |
rethrowServiceException(java.lang.Exception e) |
void |
setDestination(ConsumeDestinationGenerator cd)
Set the destination generator.
|
void |
setMessageAggregator(MessageAggregator cmh)
Set the message handler that controls how the correlated message is merged into the original.
|
void |
start()
Starts the component.
|
protected void |
start(ComponentLifecycle ac) |
void |
stop()
Stop the component
|
protected void |
stop(ComponentLifecycle ac) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aggregateMessages
public MessageAggregator getMessageAggregator()
public void setMessageAggregator(MessageAggregator cmh)
cmh
- the messageHandler to setpublic void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
init
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
spublic void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of AdaptrisMessageConsumer
, calling start
will begin message delivery.
start
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
spublic void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of AdaptrisMessageConsumer
, calling stop
will pause message delivery. Throwing a RuntimeException
may cause unintended consequences
stop
in interface ComponentLifecycle
public void close()
ComponentLifecycle
A closed component should release any connections it uses, etc. and clean up completely. Throwing a RuntimeException
may
cause unintended consequences
close
in interface ComponentLifecycle
public ConsumeDestinationGenerator getDestination()
public void setDestination(ConsumeDestinationGenerator cd)
cd
- the destination generator.protected static void rethrowServiceException(java.lang.Exception e) throws ServiceException
ServiceException
protected void start(ComponentLifecycle ac) throws ServiceException
ServiceException
protected void stop(ComponentLifecycle ac)