public class HttpComponents43Client extends AbstractClient
DELETE_METHOD, GET_METHOD, LIVE_API, POST_METHOD, PUT_METHOD, SANDBOX_API| Constructor and Description |
|---|
HttpComponents43Client(String apiBaseUrl,
String apiAccessKey,
String apiAccessSecret) |
HttpComponents43Client(String apiBaseUrl,
String apiAccessKey,
String apiAccessSecret,
org.apache.http.client.HttpClient httpClient) |
| 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) |
protected Response |
sendVideoUploadRequest(URL url,
RequestMethod method,
String auth,
InputStream input,
String fileName,
long fileSize)
Sends video with an authentication value to a webservice.
|
protected Response |
sendXmlAttachmentRequest(URL url,
RequestMethod method,
String xml,
InputStream input,
String fileName,
String mimeType)
Sends XML string together with a file to a webservice.
|
protected Response |
sendXmlRequest(URL url,
RequestMethod method,
String xml)
Sends XML string to a webservice.
|
void |
setDefaultHttpClient() |
void |
setDefaultHttpClient(int timeout) |
void |
setHttpClient(org.apache.http.client.HttpClient httpClient) |
authorize, authorize, authorizeAfterVerification, authorizeAfterVerification, fetchVerification, fetchVerification, getApiBaseUrl, getAuthConsumer, getAuthProvider, getEncodedParameterValue, getEncodingpublic HttpComponents43Client(String apiBaseUrl, String apiAccessKey, String apiAccessSecret)
protected 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
IOExceptionprotected Response sendXmlRequest(URL url, RequestMethod method, String xml) throws IOException, oauth.signpost.exception.OAuthException
AbstractClientsendXmlRequest in class AbstractClienturl - the URL of the websericemethod - the HTTP method of the outgoing requestxml - the XML string, that is sent to the webserviceIOExceptionoauth.signpost.exception.OAuthExceptionprotected Response sendXmlAttachmentRequest(URL url, RequestMethod method, String xml, InputStream input, String fileName, String mimeType) throws IOException, oauth.signpost.exception.OAuthException
AbstractClientsendXmlAttachmentRequest in class AbstractClienturl - the URL of the websericemethod - the HTTP method of the outgoing requestxml - the XML string, that is sent to the webserviceinput - the file content, that is sent to the webservicefileName - the name of the file, that is sent to the webservicemimeType - the MIME-type of the file, that is sent to the webserviceIOExceptionoauth.signpost.exception.OAuthExceptionprotected Response sendVideoUploadRequest(URL url, RequestMethod method, String auth, InputStream input, String fileName, long fileSize) throws IOException, oauth.signpost.exception.OAuthException
AbstractClientsendVideoUploadRequest in class AbstractClienturl - the URL of the websericemethod - the HTTP method of the outgoing requestauth - the authentication value, that is sent to the webserviceinput - the file content, that is sent to the webservicefileName - the name of the file, that is sent to the webservicefileSize - the size of the file, that is sent to the webservice (in bytes)IOExceptionoauth.signpost.exception.OAuthExceptionpublic void setDefaultHttpClient()
public void setDefaultHttpClient(int timeout)
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
Copyright © 2014 OpenEstate. All rights reserved.