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,java.lang.Iterable<Service>,java.util.Collection<Service>,java.util.List<Service>
- Direct Known Subclasses:
JdbcServiceList
@ComponentProfile(summary="A collection of services", tag="service,base") public class ServiceList extends ServiceListBaseImplementation ofServiceCollectionwith an ordered list ofServices.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
Constructors Constructor Description ServiceList()ServiceList(Service... serviceList)ServiceList(java.util.Collection<Service> serviceList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyServices(AdaptrisMessage msg)Apply the required services to the message.protected voiddoInit()Start any additional components.java.lang.BooleangetAllowForwardSearch()voidsetAllowForwardSearch(java.lang.Boolean b)Allow services to specify thenext servicein 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
-
-
-
-
Method Detail
-
doInit
protected void doInit() throws CoreExceptionDescription copied from class:ServiceCollectionImpStart any additional components.- Overrides:
doInitin classServiceListBase- Throws:
CoreException- wrapping any underlying exception
-
applyServices
protected void applyServices(AdaptrisMessage msg) throws ServiceException
Description copied from class:ServiceCollectionImpApply the required services to the message.- Specified by:
applyServicesin classServiceCollectionImp- Parameters:
msg- the message- Throws:
ServiceException- wrapping any underlying exception.
-
getAllowForwardSearch
public java.lang.Boolean getAllowForwardSearch()
- Returns:
- whether or not forward-search is allowed.
-
setAllowForwardSearch
public void setAllowForwardSearch(java.lang.Boolean b)
Allow services to specify thenext servicein 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).
-
-