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 Details

    • previousValuesStore

      protected transient List<String> previousValuesStore
    • store

      protected transient File store
  • Constructor Details

    • DuplicateMetadataValueService

      public DuplicateMetadataValueService()
  • Method Details

    • initService

      protected void initService() throws CoreException
      Specified by:
      initService in class ServiceImp
      Throws:
      CoreException
    • closeService

      protected void closeService()
      Specified by:
      closeService in class ServiceImp
    • loadPreviouslyReceivedValues

      protected void loadPreviouslyReceivedValues() throws Exception
      Throws:
      Exception
    • getMetadataKey

      public 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(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 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(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 CoreException
      Description copied from interface: ComponentLifecycleExtension
      Prepare for initialisation.
      Throws:
      CoreException