Class DirectoryPollingModule

    • Field Detail

      • PARAM_OUTBOX_DIRECTORY

        public static final java.lang.String PARAM_OUTBOX_DIRECTORY
        See Also:
        Constant Field Values
      • PARAM_FILE_EXTENSION_FILTER

        public static final java.lang.String PARAM_FILE_EXTENSION_FILTER
        See Also:
        Constant Field Values
      • PARAM_FILE_EXTENSION_EXCLUDE_FILTER

        public static final java.lang.String PARAM_FILE_EXTENSION_EXCLUDE_FILTER
        See Also:
        Constant Field Values
      • trackedFiles

        private java.util.Map<java.lang.String,​java.lang.Long> trackedFiles
      • outboxDir

        private java.lang.String outboxDir
      • errorDir

        private java.lang.String errorDir
      • sentDir

        private java.lang.String sentDir
      • allowExtensions

        private java.util.List<java.lang.String> allowExtensions
      • excludeExtensions

        private java.util.List<java.lang.String> excludeExtensions
      • logger

        private org.apache.commons.logging.Log logger
    • Constructor Detail

      • DirectoryPollingModule

        public DirectoryPollingModule()
    • Method Detail

      • init

        public void init​(Session session,
                         java.util.Map<java.lang.String,​java.lang.String> options)
                  throws OpenAS2Exception
        Description copied from interface: Component
        Component lifecycle hook. After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.
        Specified by:
        init in interface Component
        Overrides:
        init in class PollingModule
        Parameters:
        session - the component uses this object to access other components
        options - configuration values for the component
        Throws:
        OpenAS2Exception - If an error occurs while initializing the component
        See Also:
        Session
      • healthcheck

        public boolean healthcheck​(java.util.List<java.lang.String> failures)
        Description copied from interface: ActiveModule
        When invoked, the module must run a self check to verify it is functioning correctly. Any failures must be reported in the failures list passed in to the method by the callee
        Specified by:
        healthcheck in interface ActiveModule
        Specified by:
        healthcheck in class BaseActiveModule
        Parameters:
        failures - - a list of failures if any occur
        Returns:
        - true if module has no problems otherwise false ith failure messages in passed in List
      • checkFile

        protected boolean checkFile​(java.io.File file)
      • trackFile

        private void trackFile​(java.io.File file)
      • updateTracking

        private void updateTracking()
      • getTrackedFiles

        private java.util.Map<java.lang.String,​java.lang.Long> getTrackedFiles()