public class AS2Client extends Object
| Constructor and Description |
|---|
AS2Client() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beforeSend(AS2ClientSettings aSettings,
AS2Session aSession,
IMessage aMsg)
Callback method that is invoked before the main sending.
|
protected Partnership |
buildPartnership(AS2ClientSettings aSettings)
Create a new
Partnership object that is later used for message
creation. |
protected AS2Message |
createAS2MessageObj() |
protected CertificateFactory |
createCertificateFactory() |
protected AS2Message |
createMessage(Partnership aPartnership,
AS2ClientRequest aRequest) |
protected AS2ClientResponse |
createResponse()
Create an empty response object that is to be filled.
|
protected AS2Session |
createSession()
Create the AS2 session to be used.
|
Proxy |
getHttpProxy() |
protected void |
initCertificateFactory(AS2ClientSettings aSettings,
AS2Session aSession)
This method initializes the certificate factory.
|
protected void |
initMessageProcessor(AS2Session aSession)
Init the message processor.
|
protected void |
initPartnershipFactory(AS2Session aSession)
Init the partnership factory.
|
AS2ClientResponse |
sendSynchronous(AS2ClientSettings aSettings,
AS2ClientRequest aRequest)
Send the AS2 message synchronously
|
AS2Client |
setAS2SenderModuleFactory(Supplier<AS2SenderModule> aAS2SenderModuleFactory)
Set the factory to create
AS2SenderModule objects internally. |
AS2Client |
setHttpProxy(Proxy aHttpProxy)
Set the proxy server for transmission.
|
@Nonnull public AS2Client setAS2SenderModuleFactory(@Nonnull Supplier<AS2SenderModule> aAS2SenderModuleFactory)
AS2SenderModule objects internally. By
default a new instance of AS2SenderModule is created so you don't
need to call this method.aAS2SenderModuleFactory - The factory to be used. May not be null.@Nullable public Proxy getHttpProxy()
null.@Nonnull public AS2Client setHttpProxy(@Nullable Proxy aHttpProxy)
aHttpProxy - The proxy to use. May be null to indicate no proxy.@Nonnull @OverrideOnDemand @OverridingMethodsMustInvokeSuper protected Partnership buildPartnership(@Nonnull AS2ClientSettings aSettings)
Partnership object that is later used for message
creation. If you override this method, please ensure to call this class'
version of the method first.aSettings - The current client settings. Never null.null Partnership.@Nonnull @OverrideOnDemand protected AS2Message createAS2MessageObj()
@Nonnull @OverrideOnDemand @OverridingMethodsMustInvokeSuper protected AS2Message createMessage(@Nonnull Partnership aPartnership, @Nonnull AS2ClientRequest aRequest) throws javax.mail.MessagingException
javax.mail.MessagingException@Nonnull @OverrideOnDemand protected CertificateFactory createCertificateFactory()
null.@OverrideOnDemand protected void initCertificateFactory(@Nonnull AS2ClientSettings aSettings, @Nonnull AS2Session aSession) throws AS2Exception
aSession.setCertificateFactory (aCertFactory);.aSettings - The AS2 client settings. Never null.aSession - The AS2 session to be initialized. Never null.AS2Exception - In case of error@OverrideOnDemand protected void initPartnershipFactory(@Nonnull AS2Session aSession) throws AS2Exception
aSession.setPartnershipFactory (aPartnershipFactory);.aSession - The AS2 session to be filled. Never null.AS2Exception - In case of error@OverrideOnDemand protected void initMessageProcessor(@Nonnull AS2Session aSession) throws AS2Exception
aSession.setMessageProcessor (aMessageProcessor);.aSession - The AS2 session to be filled. Never null.AS2Exception - In case of error@Nonnull @OverrideOnDemand protected AS2ClientResponse createResponse()
null.@Nonnull @OverrideOnDemand protected AS2Session createSession()
null.@OverrideOnDemand protected void beforeSend(@Nonnull AS2ClientSettings aSettings, @Nonnull AS2Session aSession, @Nonnull IMessage aMsg)
aSettings - Client settings. Never null.aSession - Current session. Never null.aMsg - Current message. Never null.@Nonnull public AS2ClientResponse sendSynchronous(@Nonnull AS2ClientSettings aSettings, @Nonnull AS2ClientRequest aRequest)
aSettings - The settings to be used. May not be null.aRequest - The request data to be send. May not be null.null.Copyright © 2013–2022 Philip Helger. All rights reserved.