Class CloneMessageServiceList
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,ConfigComment
,EventHandlerAware
,MessageEventGenerator
,Service
,ServiceCollection
,StateManagedComponent
,Iterable<Service>
,Collection<Service>
,List<Service>
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.
-
Field Summary
Fields inherited from class com.adaptris.core.ServiceCollectionImp
eventHandler, log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Apply the required services to the message.void
Specify theAdaptrisMessage
metadata keys that will be overridden in the original message.Methods inherited from class com.adaptris.core.ServiceListBase
doClose, doInit, doStart, doStop, haltProcessing
Methods inherited from class com.adaptris.core.ServiceCollectionImp
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
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
CloneMessageServiceList
public CloneMessageServiceList() -
CloneMessageServiceList
-
CloneMessageServiceList
-
-
Method Details
-
applyServices
Description copied from class:ServiceCollectionImp
Apply the required services to the message.- Specified by:
applyServices
in classServiceCollectionImp
- Parameters:
msg
- the message- Throws:
ServiceException
- wrapping any underlying exception.
-
getOverrideMetadataFilter
-
setOverrideMetadataFilter
Specify theAdaptrisMessage
metadata keys that will be overridden in the original message.- Parameters:
mf
- the filter defaults toRemoveAllMetadataFilter
if not specified (which will mean no metadata is preserved).- See Also:
-