@NotThreadSafe public class AS2Session extends Object implements IAS2Session
IAS2Session| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_ID_CERTIFICATE_FACTORY |
static String |
COMPONENT_ID_MESSAGE_PROCESSOR |
static String |
COMPONENT_ID_PARTNERSHIP_FACTORY |
static boolean |
DEFAULT_CRYPTO_SIGN_INCLUDE_CERTIFICATE_IN_BODY_PART |
static boolean |
DEFAULT_CRYPTO_VERIFY_USE_CERTIFICATE_IN_BODY_PART |
| Constructor and Description |
|---|
AS2Session()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addComponent(String sComponentID,
IDynamicComponent aComponent)
Registers a component to a specified ID.
|
com.helger.commons.collection.impl.ICommonsMap<String,IDynamicComponent> |
getAllComponents()
Return a map of component ID's to
Component objects. |
ICertificateFactory |
getCertificateFactory()
Short-cut method to retrieve a certificate factory.
|
IDynamicComponent |
getComponent(String sComponentID)
Gets the
Component currently registered with an ID |
Proxy |
getHttpProxy()
Get the optional HTTP/HTTPS proxy settings to be used for sending AS2
messages and asynchronous MDNs.
|
IMessageProcessor |
getMessageProcessor()
Short-cut method to retrieve a processor.
|
IPartnershipFactory |
getPartnershipFactory()
Short-cut method to retrieve a partner factory.
|
boolean |
isCryptoSignIncludeCertificateInBodyPart() |
boolean |
isCryptoVerifyUseCertificateInBodyPart() |
void |
setCertificateFactory(ICertificateFactory aCertFactory) |
void |
setCryptoSignIncludeCertificateInBodyPart(boolean bCryptoSignIncludeCertificateInBodyPart)
Settings flag, whether a the signing certificate should be included in the
signed MIME body part or not.
|
void |
setCryptoVerifyUseCertificateInBodyPart(boolean bCryptoVerifyUseCertificateInBodyPart)
Settings flag, whether a contained certificate is used for message
verification.
|
void |
setHttpProxy(Proxy aHttpProxy)
Set the optional HTTP/HTTPS proxy settings to be used for sending AS2
messages and asynchronous MDNs.
|
void |
setMessageProcessor(IMessageProcessor aMsgProcessor) |
void |
setPartnershipFactory(IPartnershipFactory aPartnershipFactory) |
String |
toString() |
public static final String COMPONENT_ID_CERTIFICATE_FACTORY
public static final String COMPONENT_ID_PARTNERSHIP_FACTORY
public static final String COMPONENT_ID_MESSAGE_PROCESSOR
public static final boolean DEFAULT_CRYPTO_SIGN_INCLUDE_CERTIFICATE_IN_BODY_PART
public static final boolean DEFAULT_CRYPTO_VERIFY_USE_CERTIFICATE_IN_BODY_PART
public final void addComponent(@Nonnull @Nonempty String sComponentID, @Nonnull IDynamicComponent aComponent) throws ComponentDuplicateException
IAS2SessionaddComponent in interface IAS2SessionsComponentID - registers the component to this IDaComponent - component to registerComponentDuplicateException - In case a component with the same ID is already presentIDynamicComponentpublic void setCertificateFactory(@Nonnull ICertificateFactory aCertFactory) throws ComponentDuplicateException
ComponentDuplicateExceptionpublic void setPartnershipFactory(@Nonnull IPartnershipFactory aPartnershipFactory) throws ComponentDuplicateException
ComponentDuplicateExceptionpublic void setMessageProcessor(@Nonnull IMessageProcessor aMsgProcessor) throws ComponentDuplicateException
ComponentDuplicateException@Nonnull public final IDynamicComponent getComponent(@Nonnull @Nonempty String sComponentID) throws ComponentNotFoundException
IAS2SessionComponent currently registered with an IDgetComponent in interface IAS2SessionsComponentID - ID to search fornull.ComponentNotFoundException - If a component is not registered with the ID@Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsMap<String,IDynamicComponent> getAllComponents()
IAS2SessionComponent objects.getAllComponents in interface IAS2Session@Nonnull public final ICertificateFactory getCertificateFactory() throws ComponentNotFoundException
IAS2SessiongetCertificateFactory in interface IAS2SessionCertificateFactory componentComponentNotFoundException - If a CertificateFactory component has not been
registeredICertificateFactory,
IDynamicComponent@Nonnull public final IPartnershipFactory getPartnershipFactory() throws ComponentNotFoundException
IAS2SessiongetPartnershipFactory in interface IAS2SessionPartnerFactory componentComponentNotFoundException - If a PartnerFactory component has not been registeredIPartnershipFactory,
IDynamicComponent@Nonnull public final IMessageProcessor getMessageProcessor() throws ComponentNotFoundException
IAS2SessiongetMessageProcessor in interface IAS2SessionProcessor componentComponentNotFoundException - If a Processor component has not been registeredIMessageProcessor,
IDynamicComponentpublic boolean isCryptoSignIncludeCertificateInBodyPart()
isCryptoSignIncludeCertificateInBodyPart in interface IAS2Sessiontrue if the certificate used for signing a message
should be included in the signed MIME body part or not. Defaults to
true.IAS2Session.setCryptoSignIncludeCertificateInBodyPart(boolean)public void setCryptoSignIncludeCertificateInBodyPart(boolean bCryptoSignIncludeCertificateInBodyPart)
IAS2SessionsetCryptoSignIncludeCertificateInBodyPart in interface IAS2SessionbCryptoSignIncludeCertificateInBodyPart - true to include the signing certificate in the signed
MIME body part, false to not do so.IAS2Session.isCryptoSignIncludeCertificateInBodyPart()public boolean isCryptoVerifyUseCertificateInBodyPart()
isCryptoVerifyUseCertificateInBodyPart in interface IAS2Sessiontrue if any certificate passed in a message body is
used for certificate verification or false if only the
certificate present in the partnership factory is to be used.
Defaults to true.IAS2Session.setCryptoVerifyUseCertificateInBodyPart(boolean)public void setCryptoVerifyUseCertificateInBodyPart(boolean bCryptoVerifyUseCertificateInBodyPart)
IAS2SessionsetCryptoVerifyUseCertificateInBodyPart in interface IAS2SessionbCryptoVerifyUseCertificateInBodyPart - true if any certificate passed in a message body is
used for certificate verification or false if only the
certificate present in the partnership factory is to be used.IAS2Session.isCryptoVerifyUseCertificateInBodyPart()@Nullable public Proxy getHttpProxy()
IAS2SessiongetHttpProxy in interface IAS2Sessionnull.IAS2Session.setHttpProxy(Proxy)public void setHttpProxy(@Nullable Proxy aHttpProxy)
IAS2SessionsetHttpProxy in interface IAS2SessionaHttpProxy - The HTTP/HTTPS proxy object to be used. May be null.IAS2Session.getHttpProxy()Copyright © 2013–2019 Philip Helger. All rights reserved.