Package org.openas2.processor.receiver
Class MessageBuilderModule
- java.lang.Object
-
- org.openas2.BaseComponent
-
- org.openas2.processor.BaseProcessorModule
-
- org.openas2.processor.BaseActiveModule
-
- org.openas2.processor.receiver.BaseReceiverModule
-
- org.openas2.processor.receiver.MessageBuilderModule
-
- All Implemented Interfaces:
Component
,ActiveModule
,ProcessorModule
,ReceiverModule
- Direct Known Subclasses:
AS2FileReceiverModule
,PollingModule
public abstract class MessageBuilderModule extends BaseReceiverModule
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.commons.logging.Log
logger
static java.lang.String
PARAM_DEFAULTS
static java.lang.String
PARAM_DELIMITERS
static java.lang.String
PARAM_ERROR_DIRECTORY
static java.lang.String
PARAM_ERROR_FILENAME
static java.lang.String
PARAM_FORMAT
static java.lang.String
PARAM_MERGE_EXTRA
static java.lang.String
PARAM_MIMETYPE
static java.lang.String
PARAM_RESEND_MAX_RETRIES
static java.lang.String
PARAM_SENT_DIRECTORY
static java.lang.String
PARAM_SENT_FILENAME
-
Constructor Summary
Constructors Constructor Description MessageBuilderModule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
buildMessageData(Message msg, java.io.InputStream ip, java.lang.String filename)
Message
buildMessageMetadata(java.lang.String filename)
protected abstract Message
createMessage()
protected CompositeParameters
createParser(Message msg)
void
init(Session session, java.util.Map<java.lang.String,java.lang.String> options)
Component lifecycle hook.protected Message
processDocument(java.io.InputStream ip, java.lang.String filename)
-
Methods inherited from class org.openas2.processor.BaseActiveModule
canHandle, doStart, doStop, forceStop, handle, healthcheck, isRunning, start, stop, toString
-
Methods inherited from class org.openas2.BaseComponent
destroy, getName, getParameter, getParameter, getParameterInt, getParameters, getSession, setParameter, setParameter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openas2.processor.ActiveModule
healthcheck, isRunning, start, stop
-
Methods inherited from interface org.openas2.Component
destroy, getName, getParameters, getSession
-
Methods inherited from interface org.openas2.processor.ProcessorModule
canHandle, handle
-
-
-
-
Field Detail
-
PARAM_ERROR_DIRECTORY
public static final java.lang.String PARAM_ERROR_DIRECTORY
- See Also:
- Constant Field Values
-
PARAM_ERROR_FILENAME
public static final java.lang.String PARAM_ERROR_FILENAME
- See Also:
- Constant Field Values
-
PARAM_SENT_DIRECTORY
public static final java.lang.String PARAM_SENT_DIRECTORY
- See Also:
- Constant Field Values
-
PARAM_SENT_FILENAME
public static final java.lang.String PARAM_SENT_FILENAME
- See Also:
- Constant Field Values
-
PARAM_FORMAT
public static final java.lang.String PARAM_FORMAT
- See Also:
- Constant Field Values
-
PARAM_DELIMITERS
public static final java.lang.String PARAM_DELIMITERS
- See Also:
- Constant Field Values
-
PARAM_MERGE_EXTRA
public static final java.lang.String PARAM_MERGE_EXTRA
- See Also:
- Constant Field Values
-
PARAM_DEFAULTS
public static final java.lang.String PARAM_DEFAULTS
- See Also:
- Constant Field Values
-
PARAM_MIMETYPE
public static final java.lang.String PARAM_MIMETYPE
- See Also:
- Constant Field Values
-
PARAM_RESEND_MAX_RETRIES
public static final java.lang.String PARAM_RESEND_MAX_RETRIES
- See Also:
- Constant Field Values
-
logger
private org.apache.commons.logging.Log logger
-
-
Method Detail
-
init
public void init(Session session, java.util.Map<java.lang.String,java.lang.String> options) throws OpenAS2Exception
Description copied from interface:Component
Component lifecycle hook. After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.- Specified by:
init
in interfaceComponent
- Overrides:
init
in classBaseComponent
- Parameters:
session
- the component uses this object to access other componentsoptions
- configuration values for the component- Throws:
OpenAS2Exception
- If an error occurs while initializing the component- See Also:
Session
-
createParser
protected CompositeParameters createParser(Message msg)
-
processDocument
protected Message processDocument(java.io.InputStream ip, java.lang.String filename) throws OpenAS2Exception, java.io.FileNotFoundException
- Throws:
OpenAS2Exception
java.io.FileNotFoundException
-
createMessage
protected abstract Message createMessage()
-
buildMessageMetadata
public Message buildMessageMetadata(java.lang.String filename) throws OpenAS2Exception
- Throws:
OpenAS2Exception
-
buildMessageData
public void buildMessageData(Message msg, java.io.InputStream ip, java.lang.String filename) throws OpenAS2Exception
- Throws:
OpenAS2Exception
-
-