public class AS2ReceiverHandler extends AbstractReceiverHandler
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_SEND_EXCEPTION_STACKTRACE_IN_MDN |
static boolean |
DEFAULT_SEND_EXCEPTIONS_IN_MDN |
| Constructor and Description |
|---|
AS2ReceiverHandler(AS2ReceiverModule aModule) |
| Modifier and Type | Method and Description |
|---|---|
protected AS2Message |
createMessage(Socket aSocket)
Create a new message and record the source ip and port
|
protected void |
decompress(IMessage aMsg) |
protected void |
decrypt(IMessage aMsg,
AS2ResourceHelper aResHelper) |
protected AS2ReceiverModule |
getReceiverModule() |
void |
handle(AbstractActiveNetModule aOwner,
Socket aSocket) |
void |
handleIncomingMessage(String sClientInfo,
DataSource aMsgData,
AS2Message aMsg,
IAS2HttpResponseHandler aResponseHandler)
This method can be used to handle an incoming HTTP message AFTER the
headers where extracted.
|
boolean |
isSendExceptionsInMDN() |
boolean |
isSendExceptionStackTraceInMDN()
This method is only evaluated, if
isSendExceptionsInMDN() returns
true. |
protected void |
sendMDN(String sClientInfo,
IAS2HttpResponseHandler aResponseHandler,
AS2Message aMsg,
DispositionType aDisposition,
String sText,
com.helger.commons.state.ESuccess eSuccess) |
AS2ReceiverHandler |
setSendExceptionsInMDN(boolean bSendExceptionsInMDN) |
AS2ReceiverHandler |
setSendExceptionStackTraceInMDN(boolean bSendExceptionStackTraceInMDN)
This setting is only evaluated, if
isSendExceptionsInMDN() returns
true. |
protected void |
verify(IMessage aMsg,
AS2ResourceHelper aResHelper) |
getClientInfo, getEffectiveHttpIncomingDumper, getHttpIncomingDumper, getVerificationCertificateConsumer, setHttpIncomingDumper, setVerificationCertificateConsumerpublic static final boolean DEFAULT_SEND_EXCEPTIONS_IN_MDN
public static final boolean DEFAULT_SEND_EXCEPTION_STACKTRACE_IN_MDN
public AS2ReceiverHandler(@Nonnull AS2ReceiverModule aModule)
aModule - The receiver module to be used. May not be null.
Required for the session and the error handling.@Nonnull protected final AS2ReceiverModule getReceiverModule()
null.public final boolean isSendExceptionsInMDN()
true if exceptions should be send in the MDN,
false if not. Default is
DEFAULT_SEND_EXCEPTIONS_IN_MDN@Nonnull public final AS2ReceiverHandler setSendExceptionsInMDN(boolean bSendExceptionsInMDN)
bSendExceptionsInMDN - true to send back exception in the MDN,
false if not.public final boolean isSendExceptionStackTraceInMDN()
isSendExceptionsInMDN() returns
true.true if exception stack traces should be send in the
MDN, false if not. Default is
DEFAULT_SEND_EXCEPTION_STACKTRACE_IN_MDN.@Nonnull public final AS2ReceiverHandler setSendExceptionStackTraceInMDN(boolean bSendExceptionStackTraceInMDN)
isSendExceptionsInMDN() returns
true.bSendExceptionStackTraceInMDN - true to send back exception stack traces in the MDN,
false if not.@Nonnull protected AS2Message createMessage(@Nonnull Socket aSocket)
aSocket - The socket through which the message will be read.AS2Message to use and never null.protected void decrypt(@Nonnull IMessage aMsg, @Nonnull AS2ResourceHelper aResHelper) throws AS2Exception
AS2Exceptionprotected void verify(@Nonnull IMessage aMsg, @Nonnull AS2ResourceHelper aResHelper) throws AS2Exception
AS2Exceptionprotected void decompress(@Nonnull IMessage aMsg) throws AS2DispositionException
AS2DispositionExceptionprotected void sendMDN(@Nonnull String sClientInfo, @Nonnull IAS2HttpResponseHandler aResponseHandler, @Nonnull AS2Message aMsg, @Nonnull DispositionType aDisposition, @Nonnull String sText, @Nonnull com.helger.commons.state.ESuccess eSuccess)
public void handleIncomingMessage(@Nonnull String sClientInfo, @Nonnull DataSource aMsgData, @Nonnull AS2Message aMsg, @Nonnull IAS2HttpResponseHandler aResponseHandler)
sClientInfo - Client connection infoaMsgData - The message bodyaMsg - The AS2 message that will be filled by this methodaResponseHandler - The response handler which handles HTTP error messages as well as
synchronous MDN.public void handle(@Nonnull AbstractActiveNetModule aOwner, @Nonnull Socket aSocket)
Copyright © 2013–2022 Philip Helger. All rights reserved.