Class AggregatingConsumerImpl<E extends AggregatingConsumeService>
- java.lang.Object
-
- com.adaptris.core.services.aggregator.AggregatingConsumerImpl<E>
-
- All Implemented Interfaces:
ComponentLifecycle
,AggregatingConsumer<E>
- Direct Known Subclasses:
AggregatingFsConsumer
,AggregatingFtpConsumer
,AggregatingQueueConsumer
public abstract class AggregatingConsumerImpl<E extends AggregatingConsumeService> extends java.lang.Object implements AggregatingConsumer<E>
Base class forAggregatingConsumer
implementations.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description AggregatingConsumerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the component.java.lang.String
getEndpoint()
java.lang.String
getFilterExpression()
MessageAggregator
getMessageAggregator()
void
init()
Initialises the component.protected static void
rethrowServiceException(java.lang.Exception e)
void
setEndpoint(java.lang.String endpoint)
void
setFilterExpression(java.lang.String filterExpression)
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 componentprotected void
stop(ComponentLifecycle ac)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.services.aggregator.AggregatingConsumer
aggregateMessages
-
-
-
-
Method Detail
-
getMessageAggregator
public MessageAggregator getMessageAggregator()
- Returns:
- the messageHandler
-
setMessageAggregator
public void setMessageAggregator(MessageAggregator cmh)
Set the message handler that controls how the correlated message is merged into the original.- Parameters:
cmh
- the messageHandler to set
-
init
public void init() throws CoreException
Description copied from interface:ComponentLifecycle
Initialises the component.Component initialisation includes config verification, creation of connections etc.
- Specified by:
init
in interfaceComponentLifecycle
- Throws:
CoreException
- wrapping any underlyingException
s
-
start
public void start() throws CoreException
Description copied from interface:ComponentLifecycle
Starts the component.Once a component is started it should be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling start will begin message delivery.- Specified by:
start
in interfaceComponentLifecycle
- Throws:
CoreException
- wrapping any underlyingException
s
-
stop
public void stop()
Description copied from interface:ComponentLifecycle
Stop the componentA stopped component is not expected to be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling stop will pause message delivery. Throwing aRuntimeException
may cause unintended consequences- Specified by:
stop
in interfaceComponentLifecycle
-
close
public void close()
Description copied from interface:ComponentLifecycle
Closes the component.A closed component should release any connections it uses, etc. and clean up completely. Throwing a
RuntimeException
may cause unintended consequences- Specified by:
close
in interfaceComponentLifecycle
-
rethrowServiceException
protected static void rethrowServiceException(java.lang.Exception e) throws ServiceException
- Throws:
ServiceException
-
start
protected void start(ComponentLifecycle ac) throws ServiceException
- Throws:
ServiceException
-
stop
protected void stop(ComponentLifecycle ac)
-
getEndpoint
public java.lang.String getEndpoint()
-
setEndpoint
public void setEndpoint(java.lang.String endpoint)
-
getFilterExpression
public java.lang.String getFilterExpression()
-
setFilterExpression
public void setFilterExpression(java.lang.String filterExpression)
-
-