public abstract class DirectoryPollingModule extends PollingModule
| Modifier and Type | Field and Description |
|---|---|
static String |
PARAM_FILE_EXTENSION_FILTER |
static String |
PARAM_OUTBOX_DIRECTORY |
PARAM_DEFAULTS, PARAM_DELIMITERS, PARAM_ERROR_DIRECTORY, PARAM_FORMAT, PARAM_MIMETYPE, PARAM_RESEND_MAX_RETRIES, PARAM_SENT_DIRECTORY| Constructor and Description |
|---|
DirectoryPollingModule() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkFile(File file) |
protected abstract Message |
createMessage() |
boolean |
healthcheck(List<String> failures)
When invoked, the module must run a self check to verify it is functioning correctly.
|
void |
init(Session session,
Map<String,String> options)
Component lifecycle hook.
|
void |
poll() |
protected void |
processFile(File file) |
protected void |
scanDirectory(String directory) |
doStart, doStopbuildMessageData, buildMessageMetadata, processDocumentcanHandle, forceStop, handle, isRunning, start, stop, toStringdestroy, getName, getParameter, getParameter, getParameterInt, getParameters, getSession, setParameter, setParameterclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisRunning, start, stopcanHandle, handledestroy, getName, getParameters, getSessionpublic static final String PARAM_OUTBOX_DIRECTORY
public static final String PARAM_FILE_EXTENSION_FILTER
public void init(Session session, Map<String,String> options) throws OpenAS2Exception
Componentinit in interface Componentinit in class PollingModulesession - the component uses this object to access other componentsoptions - configuration values for the componentOpenAS2Exception - If an error occurs while initializing the componentSessionpublic boolean healthcheck(List<String> failures)
ActiveModulehealthcheck in interface ActiveModulehealthcheck in class BaseActiveModulefailures - - a list of failures if any occurpublic void poll()
poll in class PollingModuleprotected void scanDirectory(String directory) throws IOException, InvalidParameterException
IOExceptionInvalidParameterExceptionprotected boolean checkFile(File file)
protected void processFile(File file) throws OpenAS2Exception
OpenAS2Exceptionprotected abstract Message createMessage()
createMessage in class MessageBuilderModuleCopyright © 2018. All rights reserved.