public abstract class WatsonService extends Object
| Constructor and Description |
|---|
WatsonService()
Instantiates a new Watson service.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.http.HttpResponse |
execute(org.apache.http.client.methods.HttpRequestBase request)
Execute the Http request.
|
String |
getApiKey()
Gets the API key.
|
protected String |
getDefaultContentType()
Gets the default content type.
|
protected org.apache.http.params.HttpParams |
getDefaultRequestParams()
Gets the default request.
|
String |
getEndPoint()
Gets the API end point.
|
protected com.google.gson.Gson |
getGson()
Gets the gson.
|
org.apache.http.client.HttpClient |
getHttpClient()
Gets the http client.
|
void |
setApiKey(String apiKey)
Sets the API key.
|
void |
setEndPoint(String endPoint)
Sets the end point.
|
void |
setUsernameAndPassword(String username,
String password)
Sets the username and password.
|
String |
toString() |
protected org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpRequestBase request)
request - the http requestpublic String getApiKey()
protected String getDefaultContentType()
protected org.apache.http.params.HttpParams getDefaultRequestParams()
public String getEndPoint()
protected com.google.gson.Gson getGson()
public org.apache.http.client.HttpClient getHttpClient()
public void setApiKey(String apiKey)
apiKey - the new API keypublic void setEndPoint(String endPoint)
endPoint - the new end pointpublic void setUsernameAndPassword(String username, String password)
username - the usernamepassword - the passwordCopyright © 2015. All rights reserved.