IMPLTYPE - Implementation typepublic abstract class AbstractAS4Client<IMPLTYPE extends AbstractAS4Client<IMPLTYPE>> extends BasicHttpPoster implements com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_RETRIES |
static long |
DEFAULT_RETRY_INTERVAL_MS |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAS4Client(AS4ResourceHelper aResHelper) |
| Modifier and Type | Method and Description |
|---|---|
abstract AS4ClientBuiltMessage |
buildMessage(String sMessageID,
IAS4ClientBuildMessageCallback aCallback)
Build the AS4 message to be sent.
|
static com.helger.commons.functional.ISupplier<String> |
createDefaultMessageIDFactory() |
String |
createMessageID() |
AS4CryptParams |
cryptParams() |
IAS4CryptoFactory |
getAS4CryptoFactory() |
AS4ResourceHelper |
getAS4ResourceHelper() |
int |
getMaxRetries() |
com.helger.commons.functional.ISupplier<String> |
getMessageIDFactory() |
String |
getRefToMessageID() |
long |
getRetryIntervalMS() |
ESoapVersion |
getSoapVersion() |
boolean |
hasRefToMessageID() |
protected IAS4CryptoFactory |
internalCreateCryptoFactory() |
com.helger.xml.microdom.IMicroDocument |
sendMessageAndGetMicroDocument(String sURL) |
<T> AS4ClientSentMessage<T> |
sendMessageWithRetries(String sURL,
org.apache.http.client.ResponseHandler<? extends T> aResponseHandler,
IAS4ClientBuildMessageCallback aCallback)
Deprecated.
Use the version with the dumper directory. Since v0.9.9
|
<T> AS4ClientSentMessage<T> |
sendMessageWithRetries(String sURL,
org.apache.http.client.ResponseHandler<? extends T> aResponseHandler,
IAS4ClientBuildMessageCallback aCallback,
IAS4OutgoingDumper aOutgoingDumper)
Send the AS4 client message created by
buildMessage(String, IAS4ClientBuildMessageCallback) to the
provided URL. |
IMPLTYPE |
setAS4CryptoFactory(IAS4CryptoFactory aCryptoFactory)
Set all the crypto properties at once.
|
IMPLTYPE |
setMaxRetries(int nMaxRetries)
Set the maximum number of retries to be used.
|
IMPLTYPE |
setMessageID(String sMessageID)
Set a constant message ID
|
IMPLTYPE |
setMessageIDFactory(com.helger.commons.functional.ISupplier<String> aMessageIDFactory)
Set the factory that creates message IDs.
|
IMPLTYPE |
setRefToMessageID(String sRefToMessageID) |
IMPLTYPE |
setRetryIntervalMS(long nRetryIntervalMS)
Set the interval in milliseconds between retries.
|
IMPLTYPE |
setSoapVersion(ESoapVersion eSoapVersion)
This method sets the SOAP Version.
|
void |
setValuesFromPMode(IPMode aPMode,
PModeLeg aLeg) |
AS4SigningParams |
signingParams() |
createDefaultHttpClientFactory, getHttpClientFactory, getHttpCustomizer, isQuoteHttpHeaders, sendGenericMessage, sendGenericMessageWithRetries, setHttpClientFactory, setHttpCustomizer, setQuoteHttpHeaders, toStringpublic static final int DEFAULT_MAX_RETRIES
public static final long DEFAULT_RETRY_INTERVAL_MS
protected AbstractAS4Client(@Nonnull @WillNotClose AS4ResourceHelper aResHelper)
@Nonnull public static com.helger.commons.functional.ISupplier<String> createDefaultMessageIDFactory()
@Nonnull public final AS4ResourceHelper getAS4ResourceHelper()
null.@Nullable public final IAS4CryptoFactory getAS4CryptoFactory()
null by default.@Nonnull public final IMPLTYPE setAS4CryptoFactory(@Nullable IAS4CryptoFactory aCryptoFactory)
aCryptoFactory - The crypto factory to be used. May be null.@Nonnull @ReturnsMutableObject public final AS4SigningParams signingParams()
null.@Nonnull @ReturnsMutableObject public final AS4CryptParams cryptParams()
null.@Nonnull public final com.helger.commons.functional.ISupplier<String> getMessageIDFactory()
null.@Nonnull public final IMPLTYPE setMessageID(@Nonnull @Nonempty String sMessageID)
sMessageID - Message to be used. May neither be null nor empty.@Nonnull public final IMPLTYPE setMessageIDFactory(@Nonnull com.helger.commons.functional.ISupplier<String> aMessageIDFactory)
aMessageIDFactory - Factory to be used. May not be null.@Nonnull @Nonempty public final String createMessageID()
null nor empty.public final boolean hasRefToMessageID()
@Nonnull public final IMPLTYPE setRefToMessageID(@Nullable String sRefToMessageID)
@Nonnull public final ESoapVersion getSoapVersion()
null.@Nonnull public final IMPLTYPE setSoapVersion(@Nonnull ESoapVersion eSoapVersion)
eSoapVersion - SOAP version which should be set. May not be null.@Nonnegative public final int getMaxRetries()
DEFAULT_MAX_RETRIES.@Nonnull public final IMPLTYPE setMaxRetries(@Nonnegative int nMaxRetries)
nMaxRetries - Retry count. A value of 0 means "no retries". Must be
≥ 0.@Nonnegative public final long getRetryIntervalMS()
DEFAULT_RETRY_INTERVAL_MS.@Nonnull public final IMPLTYPE setRetryIntervalMS(@Nonnegative long nRetryIntervalMS)
nRetryIntervalMS - Retry interval in milliseconds. Must be ≥ 0.@Nonnull protected IAS4CryptoFactory internalCreateCryptoFactory()
public final void setValuesFromPMode(@Nullable IPMode aPMode, @Nullable PModeLeg aLeg)
@Nonnull public abstract AS4ClientBuiltMessage buildMessage(@Nonnull @Nonempty String sMessageID, @Nullable IAS4ClientBuildMessageCallback aCallback) throws Exception
sMessageID - The message ID to be used. Neither null nor empty.aCallback - Optional callback for in-between states. May be null.null.Exception - in case something goes wrong@Deprecated @Nonnull public final <T> AS4ClientSentMessage<T> sendMessageWithRetries(@Nonnull String sURL, @Nonnull org.apache.http.client.ResponseHandler<? extends T> aResponseHandler, @Nullable IAS4ClientBuildMessageCallback aCallback) throws Exception
buildMessage(String, IAS4ClientBuildMessageCallback) to the
provided URL. This methods does take retries into account. It synchronously
handles the retries and only returns after the last retry.T - The response data typesURL - The URL to send the HTTP POST toaResponseHandler - The response handler that converts the HTTP response to a domain
object. May not be null.aCallback - The optional callback that is invoked during the creation of the
AS4ClientBuiltMessage. It can be used to access several
states of message creation. May be null.Exception - in case of error when building or sending the message@Nonnull public final <T> AS4ClientSentMessage<T> sendMessageWithRetries(@Nonnull String sURL, @Nonnull org.apache.http.client.ResponseHandler<? extends T> aResponseHandler, @Nullable IAS4ClientBuildMessageCallback aCallback, @Nullable IAS4OutgoingDumper aOutgoingDumper) throws Exception
buildMessage(String, IAS4ClientBuildMessageCallback) to the
provided URL. This methods does take retries into account. It synchronously
handles the retries and only returns after the last retry.T - The response data typesURL - The URL to send the HTTP POST toaResponseHandler - The response handler that converts the HTTP response to a domain
object. May not be null.aOutgoingDumper - An outgoing dumper to be used. Maybe null. If
null the global outgoing dumper from
AS4DumpManager is used.Exception - in case of error when building or sending the messageCopyright © 2015–2020 Philip Helger. All rights reserved.