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, doStop
buildMessageData, buildMessageMetadata, processDocument
canHandle, forceStop, handle, isRunning, start, stop, toString
destroy, getName, getParameter, getParameter, getParameterInt, getParameters, getSession, setParameter, setParameter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isRunning, start, stop
canHandle, handle
destroy, getName, getParameters, getSession
public 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
Component
init
in interface Component
init
in class PollingModule
session
- the component uses this object to access other componentsoptions
- configuration values for the componentOpenAS2Exception
- If an error occurs while initializing the componentSession
public boolean healthcheck(List<String> failures)
ActiveModule
healthcheck
in interface ActiveModule
healthcheck
in class BaseActiveModule
failures
- - a list of failures if any occurpublic void poll()
poll
in class PollingModule
protected void scanDirectory(String directory) throws IOException, InvalidParameterException
IOException
InvalidParameterException
protected boolean checkFile(File file)
protected void processFile(File file) throws OpenAS2Exception
OpenAS2Exception
protected abstract Message createMessage()
createMessage
in class MessageBuilderModule
Copyright © 2018. All rights reserved.