public abstract class AbstractDirectoryPollingModule extends AbstractActivePollingModule
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_DEFAULTS |
static String |
ATTR_DELIMITERS |
static String |
ATTR_ERROR_DIRECTORY
Path of the error directory.
|
static String |
ATTR_FORMAT |
static String |
ATTR_MIMETYPE |
static String |
ATTR_OUTBOX_DIRECTORY
Path of the directory to poll from.
|
static String |
ATTR_SENDFILENAME |
static String |
ATTR_SENT_DIRECTORY
Path of the error directory.
|
static String |
ATTR_STORED_ERROR_FILENAME
Optional filename for storage in the error directory.
|
static String |
ATTR_STORED_SENT_FILENAME
Optional filename for storage in the sent directory.
|
ATTR_POLLING_INTERVALm_aRWLock| Constructor and Description |
|---|
AbstractDirectoryPollingModule() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkFile(File aFile) |
protected abstract IMessage |
createMessage() |
void |
initDynamicComponent(IAS2Session aSession,
com.helger.commons.collection.attr.IStringMap aOptions)
After creating a Component object, this method should be called to set any
parameters used by the component.
|
void |
poll()
The abstract message that is called in the defined interval and needs to be
overridden by subclasses.
|
protected void |
processFile(File aFile) |
protected void |
scanDirectory(String sDirectory) |
com.helger.commons.collection.impl.ICommonsMap<String,Long> |
trackedFiles() |
protected void |
trackFile(File aFile) |
void |
updateMessage(IMessage aMsg,
File aFile) |
protected void |
updateTracking() |
doStart, doStop, getInterval, isBusy, setIntervalcanHandle, equals, forceStop, handle, hashCode, isRunning, start, stop, toStringattrs, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSessionclone, finalize, getClass, notify, notifyAll, wait, wait, waitisRunning, start, stopcanHandle, handleattrs, getName, getSessionpublic static final String ATTR_OUTBOX_DIRECTORY
public static final String ATTR_ERROR_DIRECTORY
public static final String ATTR_STORED_ERROR_FILENAME
public static final String ATTR_SENT_DIRECTORY
public static final String ATTR_STORED_SENT_FILENAME
public static final String ATTR_FORMAT
public static final String ATTR_DELIMITERS
public static final String ATTR_DEFAULTS
public static final String ATTR_MIMETYPE
public static final String ATTR_SENDFILENAME
public void initDynamicComponent(@Nonnull IAS2Session aSession, @Nullable com.helger.commons.collection.attr.IStringMap aOptions) throws AS2Exception
IDynamicComponentinitDynamicComponent in interface IDynamicComponentinitDynamicComponent in class AbstractActivePollingModuleaSession - the component uses this object to access other componentsaOptions - configuration values for the component. All parameters will be
stored as attributes of this component. All attributes existing
before this method is called will be removed!AS2Exception - If an error occurs while initializing the componentAS2InvalidParameterException - If a required parameter is null in the parameters MapIAS2Session@Nonnull @ReturnsMutableObject public final com.helger.commons.collection.impl.ICommonsMap<String,Long> trackedFiles()
null.protected void scanDirectory(String sDirectory) throws AS2InvalidParameterException
AS2InvalidParameterExceptionprotected void processFile(@Nonnull File aFile) throws AS2Exception
AS2Exceptionprotected void updateTracking()
throws AS2Exception
AS2Exceptionpublic void updateMessage(@Nonnull IMessage aMsg, @Nonnull File aFile) throws AS2Exception
AS2Exceptionpublic void poll()
AbstractActivePollingModulepoll in class AbstractActivePollingModuleCopyright © 2013–2022 Philip Helger. All rights reserved.