public class

AS2Connector

extends Object
java.lang.Object
   ↳ com.modus.mule.modules.as2.AS2Connector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

The AS2 Connector allows you to send and receive data from AS2 certified servers.

Summary

Constants
String KEY_STORE_PASSWORD_FRIENDLY_NAME
String KEY_STORE_PATH_FRIENDLY_NAME
Fields
private ClientFacadeFactory as2ClientFactory
private ServerFacade as2Server
private ConnectorConfig connectorConfig
private final ConnectorContext connectorContext
private MuleContext muleContext
Public Constructors
AS2Connector()
Public Methods
ConnectorConfig getConnectorConfig()
ConnectorContext getConnectorContext()
MuleContext getMuleContext()
void onPostConstruct()
synchronized void onStop()
synchronized void receive(SourceCallback callback, String receiptSubject, Boolean requireSenderCompress, String requireSenderAs2From, String requireSenderAs2To, String keyStorePath, String keyStorePassword, Boolean requireSenderSigns, Boolean requireSenderEncrypts, DigestAlgorithmOptionEnum preferredDigestAlgorithm, String invokeFlowBeforeSendReceipt)
Receive AS2 messages.
MuleEvent send(String messageId, String subject, String contentType, ContentTransferEncodingEnum contentTransferEncoding, String filename, Integer receiptTimeout, Boolean compress, String as2From, String as2To, String keyStorePath, String keyStorePassword, String receiptVerificationCertificateKeyStoreEntryAlias, String asyncReceiptTlsCertificateKeyStoreEntryAlias, RequestReceipt requestReceipt, Boolean sign, Boolean encrypt, Boolean requireReceiptForUnsupportedSignatureFormat, Boolean requireReceiptForUnsupportedDigestAlgorithm, DigestAlgorithmEnum digestAlgorithm, DigestAlgorithmOptionEnum fallbackDigestAlgorithm, String receiptDeliveryOption, MuleEvent muleEvent)
Send AS2 messages using the current Mule Message payload for the message's content.
void setB2BProvider()
void setConnectorConfig(ConnectorConfig connectorConfig)
void setMuleContext(MuleContext muleContext)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

private static final String KEY_STORE_PASSWORD_FRIENDLY_NAME

Constant Value: "Key Store Password"

private static final String KEY_STORE_PATH_FRIENDLY_NAME

Constant Value: "Key Store Path"

Fields

private ClientFacadeFactory as2ClientFactory

private ServerFacade as2Server

private ConnectorConfig connectorConfig

private final ConnectorContext connectorContext

private MuleContext muleContext

Public Constructors

public AS2Connector ()

Public Methods

public ConnectorConfig getConnectorConfig ()

public ConnectorContext getConnectorContext ()

public MuleContext getMuleContext ()

public void onPostConstruct ()

public synchronized void onStop ()

public synchronized void receive (SourceCallback callback, String receiptSubject, Boolean requireSenderCompress, String requireSenderAs2From, String requireSenderAs2To, String keyStorePath, String keyStorePassword, Boolean requireSenderSigns, Boolean requireSenderEncrypts, DigestAlgorithmOptionEnum preferredDigestAlgorithm, String invokeFlowBeforeSendReceipt)

Receive AS2 messages.

Parameters
callback Callback to be invoked when a message is received.
receiptSubject Human readable string summarizing the receipt.
requireSenderCompress Specify whether the request received must be compressed.
requireSenderAs2From Required sender AS2 identifier in the request.
requireSenderAs2To Required receiver AS2 identifier in the request.
keyStorePath Path of the JKS key store containing the certificate and public/private key pair for verifying and decrypting the request as well as signing the receipt. If the key store cannot be read from the filesystem, the connector tries to read it from the Java classpath.
keyStorePassword Password protecting the key store.
requireSenderSigns Specify whether the request received must be signed.
requireSenderEncrypts Specify whether the request received must be encrypted.
preferredDigestAlgorithm Specify the preferred digest algorithm to use.
invokeFlowBeforeSendReceipt Name of the flow to invoke after processing an AS2 request but before sending receipt to sender. If the invoked flow throws an exception, then a 500 HTTP status code is returned to the sender.
Throws
AS2ConnectorException Wraps any internal error that might occur

public MuleEvent send (String messageId, String subject, String contentType, ContentTransferEncodingEnum contentTransferEncoding, String filename, Integer receiptTimeout, Boolean compress, String as2From, String as2To, String keyStorePath, String keyStorePassword, String receiptVerificationCertificateKeyStoreEntryAlias, String asyncReceiptTlsCertificateKeyStoreEntryAlias, RequestReceipt requestReceipt, Boolean sign, Boolean encrypt, Boolean requireReceiptForUnsupportedSignatureFormat, Boolean requireReceiptForUnsupportedDigestAlgorithm, DigestAlgorithmEnum digestAlgorithm, DigestAlgorithmOptionEnum fallbackDigestAlgorithm, String receiptDeliveryOption, MuleEvent muleEvent)

Send AS2 messages using the current Mule Message payload for the message's content.

Parameters
messageId Specify the value for the Message-Id header. The ID is generated when this property is not set.
subject Human readable string summarizing the request.
contentType Content-Type of the message payload.
contentTransferEncoding Content-Transfer-Encoding of the message payload. Only applicable for signed or encrypted requests.
filename Filename set in the Content-Disposition header. Only applicable for signed or encrypted requests.
receiptTimeout Wait time, in milliseconds, for receipt.
compress Specify whether to compress the message payload.
as2From AS2 identifier of the sender.
as2To AS2 identifier of the receiver.
keyStorePath Path of the JKS key store containing the certificate and public/private key pair for signing and encrypting the request as well as verifying the receipt. If the key store cannot be read from the filesystem, the connector tries to read it from the Java classpath.
keyStorePassword Password protecting the key store.
receiptVerificationCertificateKeyStoreEntryAlias Key store entry alias of the certificate used to verify the signed receipt. This option must be set if distinct certificates are used to encrypt the request and verify the returned receipt.
asyncReceiptTlsCertificateKeyStoreEntryAlias Key store entry alias of the certificate to present to the sender when receiving an async receipt over HTTPS.
requestReceipt Specify whether to request a receipt.
sign Specify whether to sign the request.
encrypt Specify whether to encrypt the request.
requireReceiptForUnsupportedSignatureFormat Specify whether the receiver should return an unsigned receipt in case the receiver could not sign the receipt with the requested signature format.
requireReceiptForUnsupportedDigestAlgorithm Specify whether the receiver should return an unsigned receipt in case the receiver could not create the receipt signature or MIC with the requested digest algorithm.
digestAlgorithm Specify the preferred digest algorithm the receiver uses to create the MIC and the signature.
fallbackDigestAlgorithm Specify the fallback digest algorithm the receiver uses to create the MIC and the signature.
receiptDeliveryOption Return URL the receiver uses to send the receipt.
muleEvent
Returns
  • Receiver's receipt.
Throws
AS2ConnectorException Wraps any internal error that might occur

public void setB2BProvider ()

public void setConnectorConfig (ConnectorConfig connectorConfig)

Parameters
connectorConfig

public void setMuleContext (MuleContext muleContext)

Parameters
muleContext