Class DuplicateMetadataValueService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.services.duplicate.DuplicateMetadataValueService
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator,Service,StateManagedComponent
- Direct Known Subclasses:
CheckMetadataValueService,StoreMetadataValueService
public abstract class DuplicateMetadataValueService extends ServiceImp
Abstract super-class of the two
Services which handle duplicate message checking.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.lang.String>previousValuesStoreprotected java.io.Filestore-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description DuplicateMetadataValueService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseService()java.lang.StringgetMetadataKey()Returns the metadata key whose value should be checked.java.lang.StringgetStoreFileUrl()Returns the persistent store for previously received values in the form of a file URL.protected voidinitService()protected voidloadPreviouslyReceivedValues()voidprepare()Prepare for initialisation.voidsetMetadataKey(java.lang.String s)Sets the metadata key whose value should be checked.voidsetStoreFileUrl(java.lang.String s)Sets the persistent store for previously received values in the form of a file URL.-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
-
-
-
Method Detail
-
initService
protected void initService() throws CoreException- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
closeService
protected void closeService()
- Specified by:
closeServicein classServiceImp
-
loadPreviouslyReceivedValues
protected void loadPreviouslyReceivedValues() throws java.lang.Exception- Throws:
java.lang.Exception
-
getMetadataKey
public java.lang.String getMetadataKey()
Returns the metadata key whose value should be checked.
- Returns:
- metadataKey the metadata key whose value should be checked
-
setMetadataKey
public void setMetadataKey(java.lang.String s)
Sets the metadata key whose value should be checked. May not be null.
- Parameters:
s- the metadata key whose value should be checked
-
getStoreFileUrl
public java.lang.String getStoreFileUrl()
Returns the persistent store for previously received values in the form of a file URL. E.g.
file:////Users/adaptris/store.dat/.- Returns:
- the persistent store for previously received values in the form of a file URL
-
setStoreFileUrl
public void setStoreFileUrl(java.lang.String s)
Sets the persistent store for previously received values in the form of a file URL. E.g.
file:////Users/adaptris/store.dat. May not be null or empty.- Parameters:
s- the persistent store for previously received values in the form of a file URL
-
prepare
public void prepare() throws CoreExceptionDescription copied from interface:ComponentLifecycleExtensionPrepare for initialisation.- Throws:
CoreException
-
-