public class AS2SenderModule extends AbstractHttpSenderModule
ATTR_CONNECT_TIMEOUT, ATTR_READ_TIMEOUT, DEFAULT_CONNECT_TIMEOUT_MS, DEFAULT_READ_TIMEOUT_MSm_aRWLockDO_SEND, DO_SEND_ASYNC_MDN| Constructor and Description |
|---|
AS2SenderModule() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
calculateAndStoreMIC(AS2Message aMsg)
From RFC 4130 section 7.3.1:
For any signed messages, the MIC to be returned is calculated on the
RFC1767/RFC3023 MIME header and content.
|
boolean |
canHandle(String sAction,
IMessage aMsg,
Map<String,Object> aOptions) |
protected void |
checkRequired(AS2Message aMsg) |
static javax.mail.internet.MimeBodyPart |
compressMimeBodyPart(javax.mail.internet.MimeBodyPart aData,
ECompressionType eCompressionType,
com.helger.mail.cte.EContentTransferEncoding eCTE) |
void |
handle(String sAction,
IMessage aBaseMsg,
Map<String,Object> aOptions) |
protected void |
onReceivedMDNError(AS2Message aMsg,
OpenAS2Exception ex)
Handler for errors in MDN processing.
|
protected void |
receiveSyncMDN(AS2Message aMsg,
IAS2HttpConnection aConn,
String sOriginalMIC) |
protected javax.mail.internet.MimeBodyPart |
secure(IMessage aMsg,
com.helger.mail.cte.EContentTransferEncoding eCTE) |
static javax.mail.internet.MimeBodyPart |
secureMimeBodyPart(javax.mail.internet.MimeBodyPart aSrcPart,
com.helger.mail.cte.EContentTransferEncoding eCTE,
ECompressionType eCompressionType,
boolean bCompressBeforeSign,
Consumer<javax.mail.internet.MimeBodyPart> aCompressBeforeSignCallback,
ECryptoAlgorithmSign eSignAlgorithm,
X509Certificate aSenderCert,
PrivateKey aSenderKey,
boolean bIncludeCertificateInSignedContent,
boolean bUseRFC3851MICAlg,
ECryptoAlgorithmCrypt eCryptAlgorithm,
X509Certificate aReceiverCert) |
protected void |
storePendingInfo(AS2Message aMsg,
String sMIC)
for storing original mic and outgoing file into pending information file
|
protected void |
updateHttpHeaders(IAS2HttpHeaderWrapper aConn,
IMessage aMsg)
Update the HTTP headers based on the provided message, before sending takes
place.
|
createHostnameVerifier, createSSLContext, getHttpClient, getHttpURLConnectiondoResend, getRetryCountattrs, equals, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSession, hashCode, initDynamicComponent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitattrs, getName, getSession, initDynamicComponentpublic boolean canHandle(@Nonnull String sAction, @Nonnull IMessage aMsg, @Nullable Map<String,Object> aOptions)
protected void checkRequired(@Nonnull AS2Message aMsg) throws InvalidParameterException
InvalidParameterExceptionprotected void storePendingInfo(@Nonnull AS2Message aMsg, @Nonnull String sMIC) throws OpenAS2Exception
aMsg - AS2MessagesMIC - MIC valueOpenAS2Exception - In case of an error@Nonnull @Nonempty protected String calculateAndStoreMIC(@Nonnull AS2Message aMsg) throws Exception
aMsg - Source messagenull nor empty.Exception - On security or AS2 issues@Nonnull public static javax.mail.internet.MimeBodyPart compressMimeBodyPart(@Nonnull javax.mail.internet.MimeBodyPart aData, @Nonnull ECompressionType eCompressionType, @Nonnull com.helger.mail.cte.EContentTransferEncoding eCTE) throws org.bouncycastle.mail.smime.SMIMEException
org.bouncycastle.mail.smime.SMIMEException@Nonnull public static javax.mail.internet.MimeBodyPart secureMimeBodyPart(@Nonnull javax.mail.internet.MimeBodyPart aSrcPart, @Nonnull com.helger.mail.cte.EContentTransferEncoding eCTE, @Nullable ECompressionType eCompressionType, boolean bCompressBeforeSign, @Nullable Consumer<javax.mail.internet.MimeBodyPart> aCompressBeforeSignCallback, @Nullable ECryptoAlgorithmSign eSignAlgorithm, @Nullable X509Certificate aSenderCert, @Nullable PrivateKey aSenderKey, boolean bIncludeCertificateInSignedContent, boolean bUseRFC3851MICAlg, @Nullable ECryptoAlgorithmCrypt eCryptAlgorithm, @Nullable X509Certificate aReceiverCert) throws Exception
Exception@Nonnull protected javax.mail.internet.MimeBodyPart secure(@Nonnull IMessage aMsg, @Nonnull com.helger.mail.cte.EContentTransferEncoding eCTE) throws Exception
Exceptionprotected void updateHttpHeaders(@Nonnull IAS2HttpHeaderWrapper aConn, @Nonnull IMessage aMsg)
aConn - The connection abstraction. Never null.aMsg - The message to be send. Never null.protected void receiveSyncMDN(@Nonnull AS2Message aMsg, @Nonnull IAS2HttpConnection aConn, @Nonnull String sOriginalMIC) throws OpenAS2Exception, IOException
aMsg - AS2MessageaConn - URLConnectionsOriginalMIC - mic value from original msgOpenAS2Exception - in case of an errorIOException - in case of an IO error@OverrideOnDemand protected void onReceivedMDNError(@Nonnull AS2Message aMsg, @Nonnull OpenAS2Exception ex) throws OpenAS2Exception
aMsg - The source message that was sendex - The exception that was caughtOpenAS2Exception - In case an overload wants to throw the exceptionpublic void handle(@Nonnull String sAction, @Nonnull IMessage aBaseMsg, @Nullable Map<String,Object> aOptions) throws OpenAS2Exception
OpenAS2ExceptionCopyright © 2013–2019 Philip Helger. All rights reserved.