Class MessageFileModule
- java.lang.Object
-
- com.helger.as2lib.AbstractDynamicComponent
-
- com.helger.as2lib.processor.module.AbstractProcessorModule
-
- com.helger.as2lib.processor.storage.AbstractStorageModule
-
- com.helger.as2lib.processor.storage.MessageFileModule
-
- All Implemented Interfaces:
IDynamicComponent,IProcessorModule,IProcessorStorageModule
public class MessageFileModule extends AbstractStorageModule
Store message content and optionally message headers and attributes to a file- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_HEADER-
Fields inherited from class com.helger.as2lib.processor.storage.AbstractStorageModule
ATTR_CHARSET, ATTR_FILENAME, ATTR_PROTOCOL, ATTR_TEMPDIR
-
Fields inherited from class com.helger.as2lib.AbstractDynamicComponent
m_aRWLock
-
Fields inherited from interface com.helger.as2lib.processor.storage.IProcessorStorageModule
DO_STORE, DO_STOREMDN, DO_VALIDATE_AFTER_STORE, DO_VALIDATE_BEFORE_STORE
-
-
Constructor Summary
Constructors Constructor Description MessageFileModule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetFilename(IMessage aMsg, String sFileParam)StringgetHeaderFilename()protected static InputStreamgetHeaderStream(IMessage aMsg, Charset aCharset)voidhandle(String sAction, IMessage aMsg, Map<String,Object> aOptions)Main handling of the message.voidsetHeaderFilename(String sHeaderFilename)-
Methods inherited from class com.helger.as2lib.processor.storage.AbstractStorageModule
canHandle, equals, getCharset, getCharsetName, getFile, getFilename, getProtocol, getTempDir, hashCode, initDynamicComponent, setCharsetName, setFilename, setProtocol, setTempDir, store
-
Methods inherited from class com.helger.as2lib.AbstractDynamicComponent
attrs, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSession, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.as2lib.IDynamicComponent
attrs, getName, getSession
-
-
-
-
Field Detail
-
ATTR_HEADER
public static final String ATTR_HEADER
- See Also:
- Constant Field Values
-
-
Method Detail
-
handle
public void handle(@Nonnull String sAction, @Nonnull IMessage aMsg, @Nullable Map<String,Object> aOptions) throws AS2Exception
Description copied from interface:IProcessorModuleMain handling of the message. Only called, ifIProcessorModule.canHandle(String, IMessage, Map)returnedtrue.- Parameters:
sAction- The action to be executed. Nevernull.aMsg- The message in question. May be an AS2 message or an MDN message. Nevernull.aOptions- The options to be considered. May benull.- Throws:
AS2Exception- in case something goes wrong
-
getFilename
@Nonnull protected String getFilename(@Nonnull IMessage aMsg, @Nullable String sFileParam) throws AS2InvalidParameterException
- Specified by:
getFilenamein classAbstractStorageModule- Throws:
AS2InvalidParameterException
-
-