Class AS2ClientManager
- java.lang.Object
-
- org.apache.camel.component.as2.api.AS2ClientManager
-
public class AS2ClientManager extends Object
Sends EDI Messages over HTTP
-
-
Field Summary
Fields Modifier and Type Field Description static String
AS2_CONNECTION
The HTTP Context Attribute containing the AS2 Connection used to send request message.static String
AS2_FROM
The HTTP Context Attribute containing the AS2 System Identifier of the sending systemstatic String
AS2_MESSAGE_STRUCTURE
The HTTP Context Attribute indicating the AS2 message structure to be sent.static String
AS2_TO
The HTTP Context Attribute containing the AS2 System Identifier of the receiving systemstatic String
CAMEL_AS2_CLIENT_PREFIX
Prefix for all AS2 HTTP Context Attributes used by the AS2 Client Manager.static String
COMPRESSION_ALGORITHM
The HTTP Context Attribute containing the algorithm used to compress EDI messagestatic String
DISPOSITION_NOTIFICATION_TO
The HTTP Context Attribute containing the internet e-mail address of sending system requesting a message disposition notification.static String
EDI_MESSAGE_CONTENT_TYPE
The HTTP Context Attribute indicating the EDI message content type to be sent.static String
EDI_MESSAGE_TRANSFER_ENCODING
The HTTP Context Attribute indicating the EDI message transfer encoding to be sent.static String
ENCRYPTING_ALGORITHM
The HTTP Context Attribute containing the algorithm name used to encrypt EDI messagestatic String
ENCRYPTING_CERTIFICATE_CHAIN
The HTTP Context Attribute containing the certificate used to encrypt EDI messagestatic String
FROM
The HTTP Context Attribute containing the internet e-mail address of sending systemstatic String
HTTP_REQUEST
The HTTP Context Attribute containing the HTTP request message transporting the EDI messagestatic String
HTTP_RESPONSE
The HTTP Context Attribute containing the HTTP response message transporting the EDI messagestatic String
REQUEST_URI
The HTTP Context Attribute containing the request URI identifying the process on the receiving system responsible for unpacking and handling of message data and generating a reply for the sending system that contains a Message Disposition Acknowledgement (MDN)static String
SIGNED_RECEIPT_MIC_ALGORITHMS
The HTTP Context Attribute containing the list of names of the requested MIC algorithms to be used by the receiving system to construct a message disposition notification.static String
SIGNING_ALGORITHM
The HTTP Context Attribute containing the algorithm used to sign EDI messagestatic String
SIGNING_CERTIFICATE_CHAIN
The HTTP Context Attribute containing the certificate chain used to sign EDI messagestatic String
SIGNING_PRIVATE_KEY
The HTTP Context Attribute containing the private key used to sign EDI messagestatic String
SUBJECT
The HTTP Context Attribute containing the subject header sent in an AS2 message.
-
Constructor Summary
Constructors Constructor Description AS2ClientManager(AS2ClientConnection as2ClientConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.operator.OutputCompressor
createCompressor(org.apache.http.protocol.HttpCoreContext httpContext)
org.bouncycastle.cms.CMSCompressedDataGenerator
createCompressorGenerator(org.apache.http.protocol.HttpCoreContext httpContext)
org.bouncycastle.cms.CMSEnvelopedDataGenerator
createEncryptingGenerator(org.apache.http.protocol.HttpCoreContext httpContext)
org.bouncycastle.operator.OutputEncryptor
createEncryptor(org.apache.http.protocol.HttpCoreContext httpContext)
AS2SignedDataGenerator
createSigningGenerator(org.apache.http.protocol.HttpCoreContext httpContext)
org.apache.http.protocol.HttpCoreContext
send(String ediMessage, String requestUri, String subject, String from, String as2From, String as2To, AS2MessageStructure as2MessageStructure, org.apache.http.entity.ContentType ediMessageContentType, String ediMessageTransferEncoding, AS2SignatureAlgorithm signingAlgorithm, Certificate[] signingCertificateChain, PrivateKey signingPrivateKey, AS2CompressionAlgorithm compressionAlgorithm, String dispositionNotificationTo, String[] signedReceiptMicAlgorithms, AS2EncryptionAlgorithm encryptingAlgorithm, Certificate[] encryptingCertificateChain)
SendediMessage
to trading partner.
-
-
-
Field Detail
-
CAMEL_AS2_CLIENT_PREFIX
public static final String CAMEL_AS2_CLIENT_PREFIX
Prefix for all AS2 HTTP Context Attributes used by the AS2 Client Manager.- See Also:
- Constant Field Values
-
AS2_MESSAGE_STRUCTURE
public static final String AS2_MESSAGE_STRUCTURE
The HTTP Context Attribute indicating the AS2 message structure to be sent.- See Also:
- Constant Field Values
-
EDI_MESSAGE_CONTENT_TYPE
public static final String EDI_MESSAGE_CONTENT_TYPE
The HTTP Context Attribute indicating the EDI message content type to be sent.- See Also:
- Constant Field Values
-
EDI_MESSAGE_TRANSFER_ENCODING
public static final String EDI_MESSAGE_TRANSFER_ENCODING
The HTTP Context Attribute indicating the EDI message transfer encoding to be sent.- See Also:
- Constant Field Values
-
HTTP_REQUEST
public static final String HTTP_REQUEST
The HTTP Context Attribute containing the HTTP request message transporting the EDI message- See Also:
- Constant Field Values
-
HTTP_RESPONSE
public static final String HTTP_RESPONSE
The HTTP Context Attribute containing the HTTP response message transporting the EDI message- See Also:
- Constant Field Values
-
AS2_CONNECTION
public static final String AS2_CONNECTION
The HTTP Context Attribute containing the AS2 Connection used to send request message.- See Also:
- Constant Field Values
-
REQUEST_URI
public static final String REQUEST_URI
The HTTP Context Attribute containing the request URI identifying the process on the receiving system responsible for unpacking and handling of message data and generating a reply for the sending system that contains a Message Disposition Acknowledgement (MDN)- See Also:
- Constant Field Values
-
SUBJECT
public static final String SUBJECT
The HTTP Context Attribute containing the subject header sent in an AS2 message.- See Also:
- Constant Field Values
-
FROM
public static final String FROM
The HTTP Context Attribute containing the internet e-mail address of sending system- See Also:
- Constant Field Values
-
AS2_FROM
public static final String AS2_FROM
The HTTP Context Attribute containing the AS2 System Identifier of the sending system- See Also:
- Constant Field Values
-
AS2_TO
public static final String AS2_TO
The HTTP Context Attribute containing the AS2 System Identifier of the receiving system- See Also:
- Constant Field Values
-
SIGNING_ALGORITHM
public static final String SIGNING_ALGORITHM
The HTTP Context Attribute containing the algorithm used to sign EDI message- See Also:
- Constant Field Values
-
SIGNING_CERTIFICATE_CHAIN
public static final String SIGNING_CERTIFICATE_CHAIN
The HTTP Context Attribute containing the certificate chain used to sign EDI message- See Also:
- Constant Field Values
-
SIGNING_PRIVATE_KEY
public static final String SIGNING_PRIVATE_KEY
The HTTP Context Attribute containing the private key used to sign EDI message- See Also:
- Constant Field Values
-
ENCRYPTING_ALGORITHM
public static final String ENCRYPTING_ALGORITHM
The HTTP Context Attribute containing the algorithm name used to encrypt EDI message- See Also:
- Constant Field Values
-
ENCRYPTING_CERTIFICATE_CHAIN
public static final String ENCRYPTING_CERTIFICATE_CHAIN
The HTTP Context Attribute containing the certificate used to encrypt EDI message- See Also:
- Constant Field Values
-
COMPRESSION_ALGORITHM
public static final String COMPRESSION_ALGORITHM
The HTTP Context Attribute containing the algorithm used to compress EDI message- See Also:
- Constant Field Values
-
DISPOSITION_NOTIFICATION_TO
public static final String DISPOSITION_NOTIFICATION_TO
The HTTP Context Attribute containing the internet e-mail address of sending system requesting a message disposition notification.- See Also:
- Constant Field Values
-
SIGNED_RECEIPT_MIC_ALGORITHMS
public static final String SIGNED_RECEIPT_MIC_ALGORITHMS
The HTTP Context Attribute containing the list of names of the requested MIC algorithms to be used by the receiving system to construct a message disposition notification.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AS2ClientManager
public AS2ClientManager(AS2ClientConnection as2ClientConnection)
-
-
Method Detail
-
send
public org.apache.http.protocol.HttpCoreContext send(String ediMessage, String requestUri, String subject, String from, String as2From, String as2To, AS2MessageStructure as2MessageStructure, org.apache.http.entity.ContentType ediMessageContentType, String ediMessageTransferEncoding, AS2SignatureAlgorithm signingAlgorithm, Certificate[] signingCertificateChain, PrivateKey signingPrivateKey, AS2CompressionAlgorithm compressionAlgorithm, String dispositionNotificationTo, String[] signedReceiptMicAlgorithms, AS2EncryptionAlgorithm encryptingAlgorithm, Certificate[] encryptingCertificateChain) throws org.apache.http.HttpException
SendediMessage
to trading partner.- Parameters:
ediMessage
- - EDI message to transportrequestUri
- - resource location to deliver messagesubject
- - message subjectfrom
- - RFC2822 address of senderas2From
- - AS2 name of senderas2To
- - AS2 name of recipientas2MessageStructure
- - the structure of AS2 to send; seeAS2MessageStructure
ediMessageContentType
- - the content typw of EDI messageediMessageTransferEncoding
- - the transfer encoding used to transport EDI messagesigningAlgorithm
- - the algorithm used to sign the message ornull
if sending EDI message unsignedsigningCertificateChain
- - the chain of certificates used to sign the message ornull
if sending EDI message unsignedsigningPrivateKey
- - the private key used to sign EDI messagecompressionAlgorithm
- - the algorithm used to compress the message ornull
if sending EDI message uncompresseddispositionNotificationTo
- - an RFC2822 address to request a receipt ornull
if no receipt requestedsignedReceiptMicAlgorithms
- - the senders list of signing algorithms for signing receipt, in preferred order, ornull
if requesting an unsigned receipt.encryptingAlgorithm
- - the algorithm used to encrypt the message ornull
if sending EDI message unencryptedencryptingCertificateChain
- - the chain of certificates used to encrypt the message ornull
if sending EDI message unencrypted- Returns:
HttpCoreContext
containing request and response used to send EDI message- Throws:
org.apache.http.HttpException
- when things go wrong.
-
createSigningGenerator
public AS2SignedDataGenerator createSigningGenerator(org.apache.http.protocol.HttpCoreContext httpContext) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
createEncryptingGenerator
public org.bouncycastle.cms.CMSEnvelopedDataGenerator createEncryptingGenerator(org.apache.http.protocol.HttpCoreContext httpContext) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
createCompressorGenerator
public org.bouncycastle.cms.CMSCompressedDataGenerator createCompressorGenerator(org.apache.http.protocol.HttpCoreContext httpContext)
-
createEncryptor
public org.bouncycastle.operator.OutputEncryptor createEncryptor(org.apache.http.protocol.HttpCoreContext httpContext) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
createCompressor
public org.bouncycastle.operator.OutputCompressor createCompressor(org.apache.http.protocol.HttpCoreContext httpContext) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
-