Class MetadataExistsBranchingService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.BranchingServiceImp
-
- com.adaptris.core.services.metadata.MetadataBranchingServiceImp
-
- com.adaptris.core.services.metadata.MetadataExistsBranchingService
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
,Service
,StateManagedComponent
@ComponentProfile(summary="Perform a branch based on whether one or more metadata keys exist or not", tag="service,branching", branchSelector=true) public class MetadataExistsBranchingService extends MetadataBranchingServiceImp
Service
which sets the ID of theService
to apply next based on whether any value is present against any configured metadata key.In the adapter configuration file this class is aliased as metadata-exists-branching-service which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description MetadataExistsBranchingService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doService(AdaptrisMessage msg)
Apply the service to the message.java.lang.String
getMetadataExistsServiceId()
Returns theServiceId
to use next if metadata (other than "") exists against any of the configured keys.void
setMetadataExistsServiceId(java.lang.String s)
Sets theServiceId
to use next if metadata (other than "") exists against any of the configured keys.-
Methods inherited from class com.adaptris.core.services.metadata.MetadataBranchingServiceImp
addMetadataKey, closeService, getDefaultServiceId, getMetadataKeys, initService, prepare, setDefaultServiceId, setMetadataKeys
-
Methods inherited from class com.adaptris.core.BranchingServiceImp
isBranching
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
-
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
Description copied from interface:Service
Apply the service to the message.
- Parameters:
msg
- theAdaptrisMessage
to process- Throws:
ServiceException
- wrapping any underlyingException
s- See Also:
#doService(com.adaptris.core.AdaptrisMessage)
-
getMetadataExistsServiceId
public java.lang.String getMetadataExistsServiceId()
Returns the
ServiceId
to use next if metadata (other than "") exists against any of the configured keys.- Returns:
- the
ServiceId
to use next if metadata (other than "") exists against any of the configured keys
-
setMetadataExistsServiceId
public void setMetadataExistsServiceId(java.lang.String s)
Sets the
ServiceId
to use next if metadata (other than "") exists against any of the configured keys.- Parameters:
s
- theServiceId
to use next if metadata (other than "") exists against any of the configured keys
-
-