Package com.adaptris.core
Class ServiceList
java.lang.Object
java.util.AbstractCollection<Service>
com.adaptris.core.ServiceCollectionImp
com.adaptris.core.ServiceListBase
com.adaptris.core.ServiceList
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,ConfigComment
,EventHandlerAware
,MessageEventGenerator
,Service
,ServiceCollection
,StateManagedComponent
,Iterable<Service>
,Collection<Service>
,List<Service>
- Direct Known Subclasses:
JdbcServiceList
@ComponentProfile(summary="A collection of services",
tag="service,base")
public class ServiceList
extends ServiceListBase
Implementation of
ServiceCollection
with an ordered list of Service
s.In the adapter configuration file this class is aliased as 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
ConstructorDescriptionServiceList
(Service... serviceList) ServiceList
(Collection<Service> serviceList) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Apply the required services to the message.protected void
doInit()
Start any additional components.void
Allow services to specify thenext service
in a forward search mode only.Methods inherited from class com.adaptris.core.ServiceListBase
doClose, 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
-
ServiceList
public ServiceList() -
ServiceList
-
ServiceList
-
-
Method Details
-
doInit
Description copied from class:ServiceCollectionImp
Start any additional components.- Overrides:
doInit
in classServiceListBase
- Throws:
CoreException
- wrapping any underlying exception
-
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.
-
getAllowForwardSearch
- Returns:
- whether or not forward-search is allowed.
-
setAllowForwardSearch
Allow services to specify thenext service
in a forward search mode only.If set to true, then the service-list will act like a limited
BranchingServiceCollection
. It will checkAdaptrisMessage.getNextServiceId()
, and search the remaining services for that service-id. If found it will execute that service (after clearing the next service id). Searches are forward only so you cannot jump backwards through the service-list.- Parameters:
b
- true to allow limited skipping of (forward only) services based onAdaptrisMessage.setNextServiceId(String)
; default is null(true).
-