public abstract class MessageSplitterServiceImp extends ServiceImp
Abstract base class for splitting messages based on some criteria.
Modifier and Type | Class and Description |
---|---|
protected static class |
MessageSplitterServiceImp.AlreadyComplete |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY_CURRENT_SPLIT_MESSAGE_COUNT |
static java.lang.String |
KEY_SPLIT_MESSAGE_COUNT |
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
MessageSplitterServiceImp() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeService() |
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
java.lang.Boolean |
getIgnoreSplitMessageFailures() |
MessageSplitter |
getSplitter()
Returns the
MessageSplitter to use. |
protected abstract java.util.concurrent.Future<?> |
handleSplitMessage(AdaptrisMessage msg) |
boolean |
ignoreSplitMessageFailures() |
protected void |
initService() |
void |
setIgnoreSplitMessageFailures(java.lang.Boolean b)
Whether or not to ignore errors on messages that are split.
|
void |
setSplitter(MessageSplitter ms)
Sets the
MessageSplitter to use. |
protected void |
waitForCompletion(java.util.List<java.util.concurrent.Future> tasks) |
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setLookupName, setUniqueId, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepare
public static final java.lang.String KEY_SPLIT_MESSAGE_COUNT
public static final java.lang.String KEY_CURRENT_SPLIT_MESSAGE_COUNT
public final void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
s#doService(com.adaptris.core.AdaptrisMessage)
protected abstract java.util.concurrent.Future<?> handleSplitMessage(AdaptrisMessage msg) throws ServiceException
ServiceException
protected void waitForCompletion(java.util.List<java.util.concurrent.Future> tasks) throws ServiceException
ServiceException
protected void initService() throws CoreException
initService
in class ServiceImp
CoreException
protected void closeService()
closeService
in class ServiceImp
public void setSplitter(MessageSplitter ms)
Sets the MessageSplitter
to use.
ms
- the MessageSplitter
to use, may not be nullpublic MessageSplitter getSplitter()
Returns the MessageSplitter
to use.
MessageSplitter
to usepublic java.lang.Boolean getIgnoreSplitMessageFailures()
public boolean ignoreSplitMessageFailures()
public void setIgnoreSplitMessageFailures(java.lang.Boolean b)
b
- if true, then all split messages will be processed; failures are
simply logged (default false)