Package org.openas2.processor.receiver
Class AS2ReceiverHandler
- java.lang.Object
-
- org.openas2.processor.receiver.AS2ReceiverHandler
-
- All Implemented Interfaces:
NetModuleHandler
public class AS2ReceiverHandler extends java.lang.Object implements NetModuleHandler
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.commons.logging.Log
logger
private AS2ReceiverModule
module
-
Constructor Summary
Constructors Constructor Description AS2ReceiverHandler(AS2ReceiverModule module)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageMDN
createMDN(Session session, AS2Message msg, java.lang.String mic, DispositionType disposition, java.lang.String text)
void
createMDNData(Session session, MessageMDN mdn, java.lang.String micAlg, java.lang.String signatureProtocol)
protected AS2Message
createMessage(java.net.Socket s)
protected java.lang.String
decryptAndVerify(AS2Message msg)
java.lang.String
getClientInfo(java.net.Socket s)
AS2ReceiverModule
getModule()
void
handle(NetModule owner, java.net.Socket s)
protected boolean
sendResponse(AS2Message msg, java.io.BufferedOutputStream out, DispositionType disposition, java.lang.String mic, java.lang.String text)
Sends a response for received AS2 message.
-
-
-
Field Detail
-
module
private AS2ReceiverModule module
-
logger
private org.apache.commons.logging.Log logger
-
-
Constructor Detail
-
AS2ReceiverHandler
public AS2ReceiverHandler(AS2ReceiverModule module)
-
-
Method Detail
-
getClientInfo
public java.lang.String getClientInfo(java.net.Socket s)
-
getModule
public AS2ReceiverModule getModule()
-
handle
public void handle(NetModule owner, java.net.Socket s)
- Specified by:
handle
in interfaceNetModuleHandler
-
createMessage
protected AS2Message createMessage(java.net.Socket s)
-
decryptAndVerify
protected java.lang.String decryptAndVerify(AS2Message msg) throws OpenAS2Exception
- Throws:
OpenAS2Exception
-
sendResponse
protected boolean sendResponse(AS2Message msg, java.io.BufferedOutputStream out, DispositionType disposition, java.lang.String mic, java.lang.String text)
Sends a response for received AS2 message. If sending an MDN is enabled then sets up MDN object and invokes theMDNSenderModule
- Parameters:
msg
- The received message that an MDN must be sent for.out
- The output stream for the connection the AS2 message was received ondisposition
- The disposition type that must be sent in the MDNmic
- The MIC of the received AS2 messagetext
- The textual message describing the result of the message receipt and processing- Returns:
- Returns true if an response was sent
-
createMDN
public MessageMDN createMDN(Session session, AS2Message msg, java.lang.String mic, DispositionType disposition, java.lang.String text) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createMDNData
public void createMDNData(Session session, MessageMDN mdn, java.lang.String micAlg, java.lang.String signatureProtocol) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-