public class DirectoryResenderModule extends AbstractActiveResenderModule
handle(String, IMessage, Map) it writes the document into a file and
there is a background poller task that checks for resending (see
resend()). If re-sending fails, the document is moved into an error
folder.| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_ERROR_DIRECTORY
The error directory.
|
static String |
ATTR_RESEND_DIRECTORY |
static String |
ATTR_STORED_ERROR_FILENAME
Optional filename for storage in the error directory.
|
ATTR_POLLING_INTERVAL_SECONDS, ATTR_RESEND_DELAY_SECONDS, DEFAULT_POLLING_MS, DEFAULT_RESEND_DELAY_MSm_aRWLockDEFAULT_RETRIES, DO_RESEND, DO_RESENDMDN, OPTION_CAUSE, OPTION_INITIAL_SENDER, OPTION_RESEND_ACTION, OPTION_RETRIES| Constructor and Description |
|---|
DirectoryResenderModule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(String sAction,
IMessage aMsg,
Map<String,Object> aOptions) |
protected String |
getFilename()
Build the filename for re-sending.
|
void |
handle(String sAction,
IMessage aMsg,
Map<String,Object> aOptions) |
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.
|
protected boolean |
isTimeToSend(File aCurrentFile) |
void |
resend() |
protected void |
resendFile(File aFile) |
protected com.helger.commons.collection.impl.ICommonsList<File> |
scanDirectory() |
doStart, doStop, equals, getResendDelayMS, hashCodeforceStop, isRunning, start, stop, toStringattrs, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSessionclone, finalize, getClass, notify, notifyAll, wait, wait, waitattrs, getName, getSessionpublic static final String ATTR_RESEND_DIRECTORY
public static final String ATTR_ERROR_DIRECTORY
public static final String ATTR_STORED_ERROR_FILENAME
public void initDynamicComponent(@Nonnull IAS2Session aSession, @Nullable com.helger.commons.collection.attr.IStringMap aOptions) throws AS2Exception
IDynamicComponentinitDynamicComponent in interface IDynamicComponentinitDynamicComponent in class AbstractActiveResenderModuleaSession - 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 MapIAS2Sessionpublic boolean canHandle(@Nonnull String sAction, @Nonnull IMessage aMsg, @Nullable Map<String,Object> aOptions)
canHandle in interface IProcessorModulecanHandle in class AbstractActiveModule@Nonnull protected String getFilename() throws AS2InvalidParameterException
null.AS2InvalidParameterException - Only theoreticallypublic void handle(@Nonnull String sAction, @Nonnull IMessage aMsg, @Nullable Map<String,Object> aOptions) throws AS2Exception
handle in interface IProcessorModulehandle in class AbstractActiveModuleAS2Exceptionprotected void resendFile(@Nonnull File aFile) throws AS2Exception
AS2Exception@Nonnull @ReturnsMutableCopy protected com.helger.commons.collection.impl.ICommonsList<File> scanDirectory() throws AS2InvalidParameterException
AS2InvalidParameterException - In case the directory listing failspublic void resend()
resend in class AbstractActiveResenderModuleCopyright © 2013–2022 Philip Helger. All rights reserved.