Class MetadataBranchingServiceImp
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.BranchingServiceImp
-
- com.adaptris.core.services.metadata.MetadataBranchingServiceImp
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
,Service
,StateManagedComponent
- Direct Known Subclasses:
MetadataExistsBranchingService
,MetadataValueBranchingService
public abstract class MetadataBranchingServiceImp extends BranchingServiceImp
Behaviour common to
Service
s which branch based onAdaptrisMessage
metadata.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description MetadataBranchingServiceImp()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMetadataKey(java.lang.String metadataKey)
Adds a metadata key to the end of theList
.protected void
closeService()
java.lang.String
getDefaultServiceId()
Returns the ID of an optional defaultService
.java.util.List<java.lang.String>
getMetadataKeys()
Returns aList
ofString
metadata keys.protected void
initService()
void
prepare()
Prepare for initialisation.void
setDefaultServiceId(java.lang.String s)
Sets the ID of an optional defaultService
.void
setMetadataKeys(java.util.List l)
Sets aList
ofString
metadata keys.-
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
-
initService
protected void initService() throws CoreException
- Specified by:
initService
in classServiceImp
- Throws:
CoreException
-
closeService
protected void closeService()
- Specified by:
closeService
in classServiceImp
-
getMetadataKeys
public java.util.List<java.lang.String> getMetadataKeys()
Returns a
List
ofString
metadata keys.- Returns:
- metadataKeys a
List
ofString
metadata keys
-
setMetadataKeys
public void setMetadataKeys(java.util.List l)
Sets a
List
ofString
metadata keys.- Parameters:
l
- metadataKeys aList
ofString
metadata keys
-
addMetadataKey
public void addMetadataKey(java.lang.String metadataKey)
Adds a metadata key to the end of the
List
. (List so you can have the same key more than once if required.)- Parameters:
metadataKey
- the metadata key to add, may not be blank
-
prepare
public void prepare() throws CoreException
Description copied from interface:ComponentLifecycleExtension
Prepare for initialisation.- Throws:
CoreException
-
getDefaultServiceId
public java.lang.String getDefaultServiceId()
Returns the ID of an optional default
Service
.- Returns:
- the ID of an optional default
Service
-
setDefaultServiceId
public void setDefaultServiceId(java.lang.String s)
Sets the ID of an optional default
Service
.- Parameters:
s
- the ID of an optional defaultService
-
-