public class AS2HttpClient extends Object implements IAS2HttpConnection
| Constructor and Description |
|---|
AS2HttpClient(String sUrl,
int nConnectTimeout,
int nReadTimeout,
com.helger.commons.http.EHttpMethod eRequestMethod,
Proxy aProxy,
SSLContext aSSLContext,
HostnameVerifier aHV) |
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect()
Close the connection
|
InputStream |
getInputStream()
Get InputStream
|
OutputStream |
getOutputStream()
Provides an output stream so user can write message content to it.
|
int |
getResponseCode()
Get response HTTP Status as integer
|
com.helger.commons.http.HttpHeaderMap |
getResponseHeaderFields() |
String |
getResponseMessage()
Get the response message
|
URL |
getURL()
Get URL
|
long |
send(InputStream aISToSend,
com.helger.mail.cte.EContentTransferEncoding eCTE,
IHTTPOutgoingDumper aOutgoingDumper) |
void |
setHttpHeader(String sName,
String sValue)
Set an HTTP header (replacing existing value)
|
public AS2HttpClient(@Nonnull @Nonempty String sUrl, int nConnectTimeout, int nReadTimeout, @Nonnull com.helger.commons.http.EHttpMethod eRequestMethod, @Nullable Proxy aProxy, @Nullable SSLContext aSSLContext, @Nullable HostnameVerifier aHV)
public void setHttpHeader(@Nonnull String sName, @Nonnull String sValue)
setHttpHeader in interface IAS2HttpConnectionsName - Header namesValue - Header valuepublic URL getURL() throws OpenAS2Exception
getURL in interface IAS2HttpConnectionOpenAS2Exception - in case of error@Nonnull public OutputStream getOutputStream() throws IOException
getOutputStream in interface IAS2HttpConnectionIOException - in case of error@Nonnegative public long send(@Nonnull InputStream aISToSend, @Nonnull com.helger.mail.cte.EContentTransferEncoding eCTE, @Nullable IHTTPOutgoingDumper aOutgoingDumper) throws IOException
aISToSend - InputStream to send. May not be null.eCTE - Content-Transfer-Encoding to be used. May not be null.aOutgoingDumper - Optional outgoing dumperIOException - In case of errorpublic InputStream getInputStream() throws OpenAS2Exception, IOException
getInputStream in interface IAS2HttpConnectionOpenAS2Exception - in case of errorIOException - in case of errorpublic int getResponseCode()
throws OpenAS2Exception
getResponseCode in interface IAS2HttpConnectionOpenAS2Exception - in case of errorpublic String getResponseMessage() throws OpenAS2Exception
getResponseMessage in interface IAS2HttpConnectionOpenAS2Exception - in case of error@Nonnull @ReturnsMutableCopy public com.helger.commons.http.HttpHeaderMap getResponseHeaderFields() throws OpenAS2Exception
getResponseHeaderFields in interface IAS2HttpConnectionOpenAS2Exception - in case of errorpublic void disconnect()
disconnect in interface IAS2HttpConnectionCopyright © 2013–2019 Philip Helger. All rights reserved.