@ComponentProfile(summary="A \'switch\' statement in configuration; replaces some usecases for branching-service-collection",
tag="service, conditional",
since="3.9.0")
public class Switch
extends ServiceImp
In the adapter configuration file this class is aliased as switch which is the preferred alternative to the fully qualified classname when building your configuration.
logCONFIRMATION_ID_KEY| Constructor and Description |
|---|
Switch() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeService() |
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
java.util.List<Case> |
getCases() |
protected void |
initService() |
void |
prepare()
Prepare for initialisation.
|
void |
setCases(java.util.List<Case> cases) |
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
Switch |
withCases(Case... cases) |
Switch |
withCases(java.util.List<Case> cases) |
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setLookupName, setUniqueIdpublic void doService(AdaptrisMessage msg) throws ServiceException
ServiceApply the service to the message.
msg - the AdaptrisMessage to processServiceException - wrapping any underlying Exceptionspublic void prepare()
throws CoreException
ComponentLifecycleExtensionCoreExceptionprotected void initService()
throws CoreException
initService in class ServiceImpCoreExceptionpublic void start()
throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of
AdaptrisMessageConsumer, calling start will begin message delivery.
start in interface ComponentLifecyclestart in class ServiceImpCoreException - wrapping any underlying Exceptionspublic void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of
AdaptrisMessageConsumer, calling stop will pause message delivery. Throwing a
RuntimeException may cause unintended consequences
stop in interface ComponentLifecyclestop in class ServiceImpprotected void closeService()
closeService in class ServiceImppublic java.util.List<Case> getCases()
public void setCases(java.util.List<Case> cases)