Package com.nettoolkit.internal
Class NetToolKitClient
java.lang.Object
com.nettoolkit.internal.NetToolKitClient
- Direct Known Subclasses:
CaseCollectorClient,DashboardsClient,GatekeeperClient,ShibbolethClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected HttpClientprotected intprotected String -
Constructor Summary
ConstructorsConstructorDescriptionNetToolKitClient(String strApiKey) NetToolKitClient(String strApiKey, boolean bUseHttps) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected JSONObjectgetFirstResult(String strResponse) protected Stringprotected Stringprotected JSONArraygetResults(String strResponse) intbooleanprotected JSONObjectparseResponse(String strResponse) send(BaseApiRequest request) protected StringsendDelete(String strPath) protected StringsendDelete(String strPath, String strQuery) protected Stringprotected Stringprotected StringsendHttpRequest(HttpMethod method, String strPath, String strQueryString, String strBody, HttpContentType contentType) protected StringsendPost(String strPath, JSONObject jsonBody) protected Stringprotected StringsendPost(String strPath, String strBody, HttpContentType contentType) protected StringsendPut(String strPath, JSONObject jsonBody) protected Stringprotected StringsendPut(String strPath, String strBody, HttpContentType contentType) voidvoidsetTimeout(int iTimeout) voidsetUseHttps(boolean bUseHttps)
-
Field Details
-
mstrApiKey
-
mbUseHttps
protected boolean mbUseHttps -
miTimeout
protected int miTimeout -
mHttpClient
-
-
Constructor Details
-
NetToolKitClient
-
NetToolKitClient
-
-
Method Details
-
getApiKey
-
setApiKey
-
getUseHttps
public boolean getUseHttps() -
setUseHttps
public void setUseHttps(boolean bUseHttps) -
getTimeout
public int getTimeout() -
setTimeout
public void setTimeout(int iTimeout) -
getBaseUrl
-
getProtocol
-
getHostname
-
send
public ApiResponse send(BaseApiRequest request) throws ParsingException, ApiConnectionException, ApiException -
sendPost
- Throws:
ApiConnectionException
-
sendPost
- Throws:
ApiConnectionException
-
sendPost
protected String sendPost(String strPath, String strBody, HttpContentType contentType) throws ApiConnectionException - Throws:
ApiConnectionException
-
sendGet
- Throws:
ApiConnectionException
-
sendGet
- Throws:
ApiConnectionException
-
sendPut
- Throws:
ApiConnectionException
-
sendPut
- Throws:
ApiConnectionException
-
sendPut
protected String sendPut(String strPath, String strBody, HttpContentType contentType) throws ApiConnectionException - Throws:
ApiConnectionException
-
sendDelete
- Throws:
ApiConnectionException
-
sendDelete
- Throws:
ApiConnectionException
-
sendHttpRequest
protected String sendHttpRequest(HttpMethod method, String strPath, String strQueryString, String strBody, HttpContentType contentType) throws ApiConnectionException - Throws:
ApiConnectionException
-
buildUrl
-
parseResponse
- Throws:
ParsingExceptionApiException
-
getResults
- Throws:
ParsingExceptionApiException
-
getFirstResult
- Throws:
ParsingExceptionApiException
-