public abstract class AbstractHttpSenderModule extends AbstractSenderModule
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_CONNECT_TIMEOUT
Attribute name for connection timeout in milliseconds
|
static String |
ATTR_QUOTE_HEADER_VALUES
Attribute name for quoting header values (boolean)
|
static String |
ATTR_RESPONSE_TIMEOUT
Attribute name for read timeout in milliseconds
|
static org.apache.hc.core5.util.Timeout |
DEFAULT_CONNECT_TIMEOUT
Default connection timeout: 60 seconds
|
static boolean |
DEFAULT_QUOTE_HEADER_VALUES
Default quote header values: false
|
static org.apache.hc.core5.util.Timeout |
DEFAULT_RESPONSE_TIMEOUT
Default read timeout: 60 seconds
|
m_aRWLockDO_SEND, DO_SEND_ASYNC_MDN| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttpSenderModule() |
| Modifier and Type | Method and Description |
|---|---|
HostnameVerifier |
createHostnameVerifier()
Get the hostname verifier to be used.
|
SSLContext |
createSSLContext()
Create the
SSLContext to be used for https connections. |
org.apache.hc.core5.util.Timeout |
getConnectTimeout() |
IHTTPIncomingDumper |
getEffectiveHttpIncomingDumper()
Get the customized incoming dumper, falling back to the global incoming
dumper if no specific dumper is set.
|
AS2HttpClient |
getHttpClient(String sUrl,
com.helger.commons.http.EHttpMethod eRequestMethod,
Proxy aProxy)
Generate a HttpClient connection.
|
IHTTPIncomingDumper |
getHttpIncomingDumper() |
IHTTPOutgoingDumper |
getHttpOutgoingDumper(IBaseMessage aMsg) |
IHTTPOutgoingDumperFactory |
getHttpOutgoingDumperFactory() |
IAS2OutgoingHttpCallback |
getOutgoingHttpCallback() |
org.apache.hc.core5.util.Timeout |
getResponseTimeout() |
boolean |
isQuoteHeaderValues() |
boolean |
isUseSSL(String sUrl)
Determine, if the SSL/TLS context should be used or not.
|
void |
setConnectTimeoutMilliseconds(long nMS) |
void |
setHttpIncomingDumper(IHTTPIncomingDumper aHttpIncomingDumper)
Set the specific incoming dumper of this receiver.
|
void |
setHttpOutgoingDumperFactory(IHTTPOutgoingDumperFactory aHttpOutgoingDumperFactory) |
void |
setOutgoingHttpCallback(IAS2OutgoingHttpCallback aRCC)
Set the http communication callback that is invoked with the most crucial
data elements for easy logging.
|
void |
setQuoteHeaderValues(boolean bQuoteHeaderValues) |
void |
setResponseTimeoutMilliseconds(long nMS) |
doResend, getRetryCountattrs, equals, getAttributeAsIntRequired, getAttributeAsStringRequired, getName, getSession, hashCode, initDynamicComponent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcanHandle, handleattrs, getName, getSession, initDynamicComponentpublic static final String ATTR_CONNECT_TIMEOUT
public static final String ATTR_RESPONSE_TIMEOUT
public static final String ATTR_QUOTE_HEADER_VALUES
public static final org.apache.hc.core5.util.Timeout DEFAULT_CONNECT_TIMEOUT
public static final org.apache.hc.core5.util.Timeout DEFAULT_RESPONSE_TIMEOUT
public static final boolean DEFAULT_QUOTE_HEADER_VALUES
@Nullable public final IHTTPOutgoingDumperFactory getHttpOutgoingDumperFactory()
@Nullable public final IHTTPOutgoingDumper getHttpOutgoingDumper(@Nonnull IBaseMessage aMsg)
public final void setHttpOutgoingDumperFactory(@Nullable IHTTPOutgoingDumperFactory aHttpOutgoingDumperFactory)
@Nullable public final IHTTPIncomingDumper getHttpIncomingDumper()
null.@Nullable public final IHTTPIncomingDumper getEffectiveHttpIncomingDumper()
null.public final void setHttpIncomingDumper(@Nullable IHTTPIncomingDumper aHttpIncomingDumper)
aHttpIncomingDumper - The specific incoming dumper to be used. May be null.@Nullable public final IAS2OutgoingHttpCallback getOutgoingHttpCallback()
null.public final void setOutgoingHttpCallback(@Nullable IAS2OutgoingHttpCallback aRCC)
aRCC - The callback object. May be null.@Nonnull public final org.apache.hc.core5.util.Timeout getConnectTimeout()
public final void setConnectTimeoutMilliseconds(long nMS)
@Nonnull public final org.apache.hc.core5.util.Timeout getResponseTimeout()
public final void setResponseTimeoutMilliseconds(long nMS)
public final boolean isQuoteHeaderValues()
public final void setQuoteHeaderValues(boolean bQuoteHeaderValues)
@Nonnull @OverrideOnDemand public SSLContext createSSLContext() throws GeneralSecurityException
SSLContext to be used for https connections. By default
the SSL context will trust all hosts and present no keys. Override this
method in a subclass to customize this handling.SSLContext. May not be null.GeneralSecurityException - If something internally goes wrong.@Nullable @OverrideOnDemand public HostnameVerifier createHostnameVerifier()
HostnameVerifierVerifyAll is returned. Override this method to
change this default behavior.null it will not be applied to the https connection.@OverrideOnDemand public boolean isUseSSL(@Nonnull @Nonempty String sUrl)
true if the URL starts with "https".sUrl - The URL to which the request is made.true to use SSL/TLS, false if not needed.@Nonnull public AS2HttpClient getHttpClient(@Nonnull @Nonempty String sUrl, @Nonnull com.helger.commons.http.EHttpMethod eRequestMethod, @Nullable Proxy aProxy) throws AS2Exception
sUrl - URL to connect toeRequestMethod - HTTP Request method to use. May not be null.aProxy - Optional proxy to use. May be null.AS2HttpClient object to work withAS2Exception - If something goes wrongCopyright © 2013–2022 Philip Helger. All rights reserved.