Component, ProcessorModule, StorageModuleMDNFileModule, MessageFileModulepublic abstract class BaseStorageModule extends BaseProcessorModule implements StorageModule
| Modifier and Type | Field | Description |
|---|---|---|
static String |
PARAM_FILENAME |
|
static String |
PARAM_PROTOCOL |
|
static String |
PARAM_TEMPDIR |
DO_STORE, DO_STOREMDN| Constructor | Description |
|---|---|
BaseStorageModule() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
canHandle(String action,
Message msg,
Map<Object,Object> options) |
|
protected File |
getFile(Message msg,
String fileParam) |
Add one more method "getFile" to make no impact to all modules who call this method with
only two parameter "Message msg" & "String fileParam"
|
protected File |
getFile(Message msg,
String fileParam,
String action) |
Extracts name of the file from the file parameter and returns a File object with the file name
|
protected abstract String |
getFilename(Message msg,
String fileParam,
String action) |
|
protected abstract String |
getModuleAction() |
|
void |
init(Session session,
Map<String,String> options) |
Component lifecycle hook.
|
protected void |
store(File msgFile,
InputStream in) |
|
protected void |
writeStream(InputStream in,
File destination) |
destroy, getName, getParameter, getParameter, getParameterInt, getParameters, getSession, setParameter, setParameterdestroy, getName, getParameters, getSessionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlepublic static final String PARAM_FILENAME
public static final String PARAM_PROTOCOL
public static final String PARAM_TEMPDIR
public boolean canHandle(String action, Message msg, Map<Object,Object> options)
canHandle in interface ProcessorModulepublic void init(Session session, Map<String,String> options) throws OpenAS2Exception
Componentinit in interface Componentinit in class BaseComponentsession - the component uses this object to access other componentsoptions - configuration values for the componentOpenAS2Exception - If an error occurs while initializing the componentSessionprotected abstract String getModuleAction()
protected File getFile(Message msg, String fileParam) throws IOException, OpenAS2Exception
msg - the context objectfileParam - Name of the fileIOException - - IO system has a problemOpenAS2Exception - - internally handled error condition occurredprotected File getFile(Message msg, String fileParam, String action) throws IOException, OpenAS2Exception
msg - the context objectfileParam - The parameter containing the format string for the file nameaction - what to doIOException - - IO system has a problemOpenAS2Exception - - internally handled error condition occurredprotected abstract String getFilename(Message msg, String fileParam, String action) throws InvalidParameterException
InvalidParameterExceptionprotected void store(File msgFile, InputStream in) throws IOException, OpenAS2Exception
IOExceptionOpenAS2Exceptionprotected void writeStream(InputStream in, File destination) throws IOException
IOExceptionCopyright © 2018. All rights reserved.