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_PASSWORD_SUMMARY
String KEY_STORE_PATH_FRIENDLY_NAME
Fields
private ClientFacadeFactory as2ClientFactory
private ServerFacade as2Server
private B2BProvider b2bProvider
private final ConnectorContext connectorContext
private String httpEndpointRef Global HTTP endpoint reference from where the connector will read or write messages to.
private MuleContext muleContext
private Boolean useB2BProvider Integrate with Anypoint B2B platform to manage your AS2 Connector and record AS2 transmissions.
Public Constructors
AS2Connector()
Public Methods
ConnectorContext getConnectorContext()
String getHttpEndpointRef()
MuleContext getMuleContext()
Boolean getUseB2BProvider()
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 setHttpEndpointRef(String httpEndpointRef)
void setMuleContext(MuleContext muleContext)
void setUseB2BProvider(Boolean useB2BProvider)
[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_PASSWORD_SUMMARY

Constant Value: "Password protecting the key store."

private static final String KEY_STORE_PATH_FRIENDLY_NAME

Constant Value: "Key Store Path"

Fields

private ClientFacadeFactory as2ClientFactory

private ServerFacade as2Server

private B2BProvider b2bProvider

private final ConnectorContext connectorContext

private String httpEndpointRef

Global HTTP endpoint reference from where the connector will read or write messages to.

private MuleContext muleContext

private Boolean useB2BProvider

Integrate with Anypoint B2B platform to manage your AS2 Connector and record AS2 transmissions. The B2B Connector must be set up before enabling this feature.

Public Constructors

public AS2Connector ()

Public Methods

public ConnectorContext getConnectorContext ()

public String getHttpEndpointRef ()

public MuleContext getMuleContext ()

public Boolean getUseB2BProvider ()

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 retrieved from the filesystem, the connector tries to receive 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 retrieved from the filesystem, the connector tries to receive 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 a receipt in case the receiver could not sign the receipt.
requireReceiptForUnsupportedDigestAlgorithm Specify whether the receiver should return a receipt in case the receiver could not add the MIC to the receipt.
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 setHttpEndpointRef (String httpEndpointRef)

Parameters
httpEndpointRef

public void setMuleContext (MuleContext muleContext)

Parameters
muleContext

public void setUseB2BProvider (Boolean useB2BProvider)

Parameters
useB2BProvider