public class DefaultClient extends AbstractClient
AbstractClient, that makes use of
HttpURLConnection for HTTP transfers.LIVE_API, SANDBOX_API| Constructor and Description |
|---|
DefaultClient(String apiBaseUrl,
String consumerToken,
String consumerSecret)
Create an instance of
DefaultClient. |
| Modifier and Type | Method and Description |
|---|---|
protected Response |
createResponse(HttpURLConnection connection)
Retrieve a
Response from a request, that was sent through
HttpURLConnection. |
protected Response |
sendVideoUploadRequest(URL url,
RequestMethod method,
String auth,
InputStream input,
String fileName,
long fileSize)
Sends a video with an authentication value to the IS24-Webservice.
|
protected Response |
sendXmlAttachmentRequest(URL url,
RequestMethod method,
String xml,
InputStream input,
String fileName,
String mimeType)
Sends a XML string together with a file to the IS24-Webservice.
|
protected Response |
sendXmlRequest(URL url,
RequestMethod method,
String xml)
Sends a XML string to the IS24-Webservice.
|
authorize, authorize, authorizeAfterVerification, authorizeAfterVerification, buildOAuthConsumer, buildOAuthProvider, fetchVerification, fetchVerification, getApiBaseUrl, getAuthConsumer, getAuthProvider, getEncodedParameterValue, getEncoding, getUrlEncodedValuepublic DefaultClient(String apiBaseUrl, String consumerToken, String consumerSecret)
DefaultClient.apiBaseUrl - URL of the IS24-WebserviceconsumerToken - consumer token, that identifies the application at the IS24-WebserviceconsumerSecret - consumer secret, that identifies the application at the IS24-Webserviceprotected Response createResponse(HttpURLConnection connection) throws IOException
Response from a request, that was sent through
HttpURLConnection.connection - HttpURLConnection, that contains the server responseResponse of the requestIOException - if the Response can't be obtainedprotected Response sendXmlRequest(URL url, RequestMethod method, String xml) throws IOException, oauth.signpost.exception.OAuthException
AbstractClient
This function must be implemendet by specific implementations of
AbstractClient.
sendXmlRequest in class AbstractClienturl - URL of the IS24-Webservice, where the request is sent tomethod - HTTP method of the outgoing requestxml - XML string, that is sent to the IS24-WebserviceIOException - if communication with IS24-Webservice failedoauth.signpost.exception.OAuthException - if authorization failedprotected Response sendXmlAttachmentRequest(URL url, RequestMethod method, String xml, InputStream input, String fileName, String mimeType) throws IOException, oauth.signpost.exception.OAuthException
AbstractClient
This function must be implemendet by specific implementations of
AbstractClient.
sendXmlAttachmentRequest in class AbstractClienturl - URL of the IS24-Webservice, where the request is sent tomethod - the HTTP method of the outgoing requestxml - the XML string, that is sent to the IS24-Webserviceinput - the file content, that is sent to the IS24-WebservicefileName - the name of the file, that is sent to the IS24-WebservicemimeType - the MIME-type of the file, that is sent to the IS24-WebserviceIOException - if communication with IS24-Webservice failedoauth.signpost.exception.OAuthException - if authorization failedprotected Response sendVideoUploadRequest(URL url, RequestMethod method, String auth, InputStream input, String fileName, long fileSize) throws IOException, oauth.signpost.exception.OAuthException
AbstractClient
This function must be implemendet by specific implementations of
AbstractClient.
sendVideoUploadRequest in class AbstractClienturl - URL of the IS24-Webservice, where the request is sent tomethod - HTTP method of the outgoing requestauth - authentication value, that is sent to the IS24-Webserviceinput - file content, that is sent to the IS24-WebservicefileName - name of the file, that is sent to the IS24-WebservicefileSize - size of the file, that is sent to the IS24-Webservice (in bytes)IOException - if communication with IS24-Webservice failedoauth.signpost.exception.OAuthException - if authorization failedCopyright © 2014 OpenEstate. All rights reserved.