@ComponentProfile(summary="A Collection of services where the next service is determined dynamically", tag="service,base,branching") public class BranchingServiceCollection extends ServiceCollectionImp
ServiceCollection
which allows branching
services to select the next service to apply.In the adapter configuration file this class is aliased as branching-service-collection which is the preferred alternative to the fully qualified classname when building your configuration.
eventHandler, log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
BranchingServiceCollection() |
BranchingServiceCollection(java.util.Collection<Service> list) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyServices(AdaptrisMessage msg)
Apply the required services to the message.
|
protected void |
doClose()
Close any additional components.
|
protected void |
doInit()
Start any additional components.
|
protected void |
doStart()
Start any additional components.
|
protected void |
doStop()
Stop any additional components.
|
protected java.util.Collection<? extends Service> |
enforceRequirements(java.util.Collection<? extends Service> collection)
Enforce any requirements of the list.
|
protected Service |
enforceRequirements(Service service)
Enforce any requirements of the list.
|
java.lang.String |
getFirstServiceId()
Returns the unique ID of the first
Service to apply. |
void |
setFirstServiceId(java.lang.String s)
Sets the unique ID of the first
Service to apply. |
BranchingServiceCollection |
withFirstServiceId(java.lang.String s) |
add, add, addAll, addAll, addService, changeState, clear, close, continueOnFailure, createName, createQualifier, doService, get, getComments, getContinueOnFail, getIsTrackingEndpoint, getLookupName, 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, setLookupName, 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 BranchingServiceCollection()
public BranchingServiceCollection(java.util.Collection<Service> list)
protected Service enforceRequirements(Service service)
ServiceCollectionImp
enforceRequirements
in class ServiceCollectionImp
service
- the service due to be added.protected java.util.Collection<? extends Service> enforceRequirements(java.util.Collection<? extends Service> collection)
ServiceCollectionImp
enforceRequirements
in class ServiceCollectionImp
collection
- the services due to be added.protected void applyServices(AdaptrisMessage msg) throws ServiceException
ServiceCollectionImp
applyServices
in class ServiceCollectionImp
msg
- the messageServiceException
- wrapping any underlying exception.protected void doClose()
ServiceCollectionImp
doClose
in class ServiceCollectionImp
protected void doInit() throws CoreException
ServiceCollectionImp
doInit
in class ServiceCollectionImp
CoreException
- wrapping any underlying exceptionprotected void doStart() throws CoreException
ServiceCollectionImp
doStart
in class ServiceCollectionImp
CoreException
- wrapping any underlying exceptionprotected void doStop()
ServiceCollectionImp
doStop
in class ServiceCollectionImp
public java.lang.String getFirstServiceId()
Returns the unique ID of the first Service
to apply.
Service
to applypublic void setFirstServiceId(java.lang.String s)
Sets the unique ID of the first Service
to apply.
s
- the unique ID of the first Service
to applypublic BranchingServiceCollection withFirstServiceId(java.lang.String s)