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 final ConnectorContext connectorContext
private FileStorageEnum fileStorageType Type of file storage used to save the file (experimental).
private GlobalContext globalContext
private String httpEndpointRef Global HTTP endpoint reference from where the connector will read or write messages to.
private static final Logger logger
private String messageTrackerAddress Message tracker URL for recording AS2 transmissions (experimental).
private MuleContext muleContext
private String tpmServiceAddress Trading Partner Management Service URL for retrieving AS2 settings (experimental).
Public Constructors
AS2Connector()
Public Methods
ConnectorContext getConnectorContext()
FileStorageEnum getFileStorageType()
String getHttpEndpointRef()
String getMessageTrackerAddress()
MuleContext getMuleContext()
String getTpmServiceAddress()
void onPostConstruct()
synchronized void receive(SourceCallback callback, String receiptSubject, Boolean requireSenderCompress, String requireSenderAs2From, String requireSenderAs2To, String keyStorePath, String keyStorePassword, Boolean requireSenderSigns, Boolean requireSenderEncrypts, MicAlgorithmOptionEnum preferredMicAlgorithm)
Receive AS2 messages.
MuleEvent send(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 requireSignedReceipt, Boolean requireMicAlgorithm, MicAlgorithmEnum micAlgorithm, MicAlgorithmOptionEnum fallbackMicAlgorithm, String receiptDeliveryOption, MuleEvent muleEvent)
Send AS2 messages using the current Mule Message payload for the message's content.
void setFileStorageType(FileStorageEnum fileStorageType)
void setHttpEndpointRef(String httpEndpointRef)
void setMessageTrackerAddress(String messageTrackerAddress)
void setMuleContext(MuleContext muleContext)
void setTpmServiceAddress(String tpmServiceAddress)
[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 final ConnectorContext connectorContext

private FileStorageEnum fileStorageType

Type of file storage used to save the file (experimental).

private GlobalContext globalContext

private String httpEndpointRef

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

private static final Logger logger

private String messageTrackerAddress

Message tracker URL for recording AS2 transmissions (experimental).

private MuleContext muleContext

private String tpmServiceAddress

Trading Partner Management Service URL for retrieving AS2 settings (experimental).

Public Constructors

public AS2Connector ()

Public Methods

public ConnectorContext getConnectorContext ()

public FileStorageEnum getFileStorageType ()

public String getHttpEndpointRef ()

public String getMessageTrackerAddress ()

public MuleContext getMuleContext ()

public String getTpmServiceAddress ()

public void onPostConstruct ()

public synchronized void receive (SourceCallback callback, String receiptSubject, Boolean requireSenderCompress, String requireSenderAs2From, String requireSenderAs2To, String keyStorePath, String keyStorePassword, Boolean requireSenderSigns, Boolean requireSenderEncrypts, MicAlgorithmOptionEnum preferredMicAlgorithm)

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.
preferredMicAlgorithm Specify the preferred MIC algorithm to use.
Throws
AS2ConnectorException which wraps any internal error that might occur

public MuleEvent send (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 requireSignedReceipt, Boolean requireMicAlgorithm, MicAlgorithmEnum micAlgorithm, MicAlgorithmOptionEnum fallbackMicAlgorithm, String receiptDeliveryOption, MuleEvent muleEvent)

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

Parameters
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 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 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.
requireSignedReceipt Specify whether the receiver should return a receipt in case the receiver could not sign the receipt.
requireMicAlgorithm Specify whether the receiver should return a receipt in case the receiver could not add the MIC to the receipt.
micAlgorithm Specify the preferred MIC algorithm the receiver uses to create the MIC.
fallbackMicAlgorithm Specify the fallback MIC algorithm the receiver uses to create the MIC.
receiptDeliveryOption Return URL the receiver uses to send the receipt.
muleEvent
Returns
  • Receiver's receipt.
Throws
AS2ConnectorException which wraps any internal error that might occur

public void setFileStorageType (FileStorageEnum fileStorageType)

Parameters
fileStorageType

public void setHttpEndpointRef (String httpEndpointRef)

Parameters
httpEndpointRef

public void setMessageTrackerAddress (String messageTrackerAddress)

Parameters
messageTrackerAddress

public void setMuleContext (MuleContext muleContext)

Parameters
muleContext

public void setTpmServiceAddress (String tpmServiceAddress)

Parameters
tpmServiceAddress