public class HttpComponents42Client extends AbstractClient
AbstractClient, that makes use of
Apache HttpComponents 4.2
for HTTP transfers.LIVE_API, RESPONSE_HEADER_API_CLIENT, RESPONSE_HEADER_CAUSER_ID, RESPONSE_HEADER_REQUEST_REFNUM, RESPONSE_HEADER_RESOURCE_ID, SANDBOX_API| Constructor and Description |
|---|
HttpComponents42Client(String apiBaseUrl,
String consumerToken,
String consumerSecret)
Creates an instance of
HttpComponents42Client. |
HttpComponents42Client(String apiBaseUrl,
String consumerToken,
String consumerSecret,
org.apache.http.client.HttpClient httpClient)
Creates an instance of
HttpComponents42Client. |
| Modifier and Type | Method and Description |
|---|---|
protected oauth.signpost.OAuthConsumer |
buildOAuthConsumer(String apiAccessKey,
String apiAccessSecret) |
protected oauth.signpost.OAuthProvider |
buildOAuthProvider(String apiBaseUrl) |
protected Response |
createResponse(org.apache.http.HttpResponse response)
Retrieves a
Response from a HttpResponse. |
protected Response |
sendVideoUploadRequest(URL url,
RequestMethod method,
String auth,
InputStream input,
String fileName,
long fileSize) |
protected Response |
sendXmlAttachmentRequest(URL url,
RequestMethod method,
String xml,
InputStream input,
String fileName,
String mimeType) |
protected Response |
sendXmlRequest(URL url,
RequestMethod method,
String xml) |
void |
setDefaultHttpClient()
Use a default
HttpClient for HTTP traffic. |
void |
setDefaultHttpClient(int timeout)
Use a default
HttpClient for HTTP traffic. |
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Use a specific
HttpClient for HTTP traffic. |
authorize, authorize, authorizeAfterVerification, authorizeAfterVerification, fetchVerification, fetchVerification, getApiBaseUrl, getAuthConsumer, getAuthProvider, getEncoding, getUrlEncodedValuepublic HttpComponents42Client(String apiBaseUrl, String consumerToken, String consumerSecret)
HttpComponents42Client.apiBaseUrl - base URL of the IS24-Webservice (see AbstractClient.LIVE_API and
AbstractClient.SANDBOX_API)consumerToken - consumer token, that identifies the application at the IS24-WebserviceconsumerSecret - consumer secret, that identifies the application at the IS24-Webservicepublic HttpComponents42Client(String apiBaseUrl, String consumerToken, String consumerSecret, org.apache.http.client.HttpClient httpClient)
HttpComponents42Client.apiBaseUrl - base URL of the IS24-Webservice (see AbstractClient.LIVE_API and
AbstractClient.SANDBOX_API)consumerToken - consumer token, that identifies the application at the IS24-WebserviceconsumerSecret - consumer secret, that identifies the application at the IS24-WebservicehttpClient - HttpClient, that is used for HTTP transfersprotected oauth.signpost.OAuthConsumer buildOAuthConsumer(String apiAccessKey, String apiAccessSecret)
buildOAuthConsumer in class AbstractClientprotected oauth.signpost.OAuthProvider buildOAuthProvider(String apiBaseUrl)
buildOAuthProvider in class AbstractClientprotected Response createResponse(org.apache.http.HttpResponse response) throws IOException
Response from a HttpResponse.response - HttpResponse, that was received by the clientResponse of the requestIOException - if the Response can't be obtainedprotected Response sendXmlRequest(URL url, RequestMethod method, String xml) throws IOException, oauth.signpost.exception.OAuthException
sendXmlRequest in class AbstractClientIOExceptionoauth.signpost.exception.OAuthExceptionprotected Response sendXmlAttachmentRequest(URL url, RequestMethod method, String xml, InputStream input, String fileName, String mimeType) throws IOException, oauth.signpost.exception.OAuthException
sendXmlAttachmentRequest in class AbstractClientIOExceptionoauth.signpost.exception.OAuthExceptionprotected Response sendVideoUploadRequest(URL url, RequestMethod method, String auth, InputStream input, String fileName, long fileSize) throws IOException, oauth.signpost.exception.OAuthException
sendVideoUploadRequest in class AbstractClientIOExceptionoauth.signpost.exception.OAuthExceptionpublic void setDefaultHttpClient()
HttpClient for HTTP traffic.public void setDefaultHttpClient(int timeout)
HttpClient for HTTP traffic.timeout - timeout for HTTP communication (in milliseconds)public void setHttpClient(org.apache.http.client.HttpClient httpClient)
HttpClient for HTTP traffic.httpClient - HttpClient, that is used for HTTP communicationCopyright © 2016 OpenEstate. All rights reserved.