@ComponentProfile(summary="A collection of services where each service gets a new copy of the message", tag="service,base") public class CloneMessageServiceList extends ServiceListBase
The expected use case for this ServiceCollection is that you have a number of services that have to process exactly the same message (e.g. transforming XML to an HTML representation as well as CSV).
If you have a list of services that require the same clone to be used; then use a nested ServiceList
to wrap all the
required Service implementations that require it (e.g. Transforming to HTML and emailing the result of the
transform)
If there are services configured after this ServiceCollection implementation then they will process the message in its original form.
In the adapter configuration file this class is aliased as clone-message-service-list which is the preferred alternative to the fully qualified classname when building your configuration.
eventHandler, log
Constructor and Description |
---|
CloneMessageServiceList() |
CloneMessageServiceList(java.util.Collection<Service> list) |
CloneMessageServiceList(Service... list) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyServices(AdaptrisMessage msg)
Apply the required services to the message.
|
MetadataFilter |
getOverrideMetadataFilter() |
void |
setOverrideMetadataFilter(MetadataFilter mf)
Specify the
AdaptrisMessage metadata keys that will be overridden in
the original message. |
doClose, doInit, doStart, doStop, haltProcessing
add, add, addAll, addAll, addService, changeState, clear, close, continueOnFailure, createName, createQualifier, doService, enforceRequirements, enforceRequirements, get, getComments, getContinueOnFail, getIsTrackingEndpoint, getOutOfStateHandler, getRestartAffectedServiceOnException, getServices, getUniqueId, handleException, indexOf, init, isBranching, isTrackingEndpoint, iterator, lastIndexOf, listIterator, listIterator, prepare, registerEventHandler, remove, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, set, setComments, setContinueOnFail, setIsTrackingEndpoint, setOutOfStateHandler, setRestartAffectedServiceOnException, setServices, setUniqueId, size, start, stop, subList, withServices
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public CloneMessageServiceList()
public CloneMessageServiceList(java.util.Collection<Service> list)
public CloneMessageServiceList(Service... list)
protected void applyServices(AdaptrisMessage msg) throws ServiceException
ServiceCollectionImp
applyServices
in class ServiceCollectionImp
msg
- the messageServiceException
- wrapping any underlying exception.public MetadataFilter getOverrideMetadataFilter()
public void setOverrideMetadataFilter(MetadataFilter mf)
AdaptrisMessage
metadata keys that will be overridden in
the original message.mf
- the filter defaults to RemoveAllMetadataFilter
if not specified (which will
mean no metadata is preserved).MetadataFilter