|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HttpClientConnection
Interface used by the commons http connector to use the jakarta commons-httpclient.
| Method Summary | |
|---|---|
void |
closeConnection()
Closes the physical connection. |
void |
establishConnection(String url,
int connectTimeout,
int readTimeout)
Establishes the connection to the target host using the given parameter values. |
void |
execute()
Executes sending the request and receiving the response. |
byte[] |
getResponseBody()
Gets the response body received from the target host. |
String |
getResponseHeader(String key)
Gets the response header parameter value for a given key. |
void |
initSsl(KeyStore keyStore,
KeyStore trustStore,
String keyAlias,
String keyAliasPassword)
Sets parameter necessary for SSL connection. |
void |
initSsl(String keyAlias,
String keyAliasPassword)
Sets parameter necessary for SSL connection. |
void |
releaseConnection()
Releases the connection for reuse. |
void |
setEventListener(HttpConnectorEventListener listener,
ConnectorContext context)
Sets the event listener used for SLA logging. |
void |
setRequestBody(InputStream body)
Sets the request body to send. |
void |
setRequestResponseHeader(HttpRequestResponseHeader header)
Sets request header to send and response header to validate. |
| Method Detail |
|---|
void establishConnection(String url,
int connectTimeout,
int readTimeout)
url - the URL to connect toconnectTimeout - the connect timeout used for connecting the hostreadTimeout - the read timeout used whilst reading the response
from the target hostvoid releaseConnection()
void closeConnection()
void execute()
throws HttpConnectionException
HttpConnectionException - in case of a connection failurevoid setRequestBody(InputStream body)
body - the message body to send
byte[] getResponseBody()
throws HttpEmptyResponseException
HttpEmptyResponseException - if response body is emptyString getResponseHeader(String key)
key - the parameter key to obtain the value for
void initSsl(KeyStore keyStore,
KeyStore trustStore,
String keyAlias,
String keyAliasPassword)
keyStore - the keystore given from Signature ServicetrustStore - the truststore given from Signature ServicekeyAlias - the alias of the key used from keystorekeyAliasPassword - the password of the key in use
void initSsl(String keyAlias,
String keyAliasPassword)
keyAlias - the alias of the key used from keystorekeyAliasPassword - the password of the key in use
void setEventListener(HttpConnectorEventListener listener,
ConnectorContext context)
listener - the listener to setcontext - the context to setvoid setRequestResponseHeader(HttpRequestResponseHeader header)
header - the header object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||