org.appdapter.core.remote.sparql
Class WebDataClient
java.lang.Object
org.appdapter.core.log.BasicDebugger
org.appdapter.core.remote.sparql.WebDataClient
- All Implemented Interfaces:
- Loggable
public class WebDataClient
- extends BasicDebugger
- Author:
- Stu B.
|
Field Summary |
protected org.apache.http.client.HttpClient |
myHttpCli
|
|
Method Summary |
String |
execGet(String url,
boolean debugFlag,
String rqSummary)
Not currently used by our SPARQL client, but provided for completeness. |
protected static String |
execGetRequest(org.apache.http.client.HttpClient httpCli,
String url,
org.slf4j.Logger log,
boolean debugFlag,
String rqSummary)
Not currently used by our SPARQL client, but provided for completeness. |
String |
execPost(String url,
List<org.apache.http.NameValuePair> nvps,
boolean debugFlag)
Use this to exec POST on any server URL, including a SPARQL-update service! |
protected static String |
execPostRequest(org.apache.http.client.HttpClient httpCli,
String postURL,
List<org.apache.http.NameValuePair> nvps,
org.slf4j.Logger log,
boolean debugFlag)
General HTTP posting method, which we make static to emphasize that there's no hidden state in it. |
protected static String |
extractResponseEntityText(org.apache.http.HttpResponse response,
org.slf4j.Logger log,
boolean debugFlag,
String rqSummary)
Extract the meaty text part of an HTTP response, optionally printing debug along the way. |
| Methods inherited from class org.appdapter.core.log.BasicDebugger |
checkDebugImportance, forceLog4jConfig, getLogger, getLoggerForClass, isLoggerUsable, logDebug, logError, logError, logInfo, logInfo, logInfoEvent, logWarning, logWarning, logWithException, setDebugImportanceThreshold, setLogger, useLoggerForClass |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myHttpCli
protected org.apache.http.client.HttpClient myHttpCli
WebDataClient
public WebDataClient()
execGet
public String execGet(String url,
boolean debugFlag,
String rqSummary)
- Not currently used by our SPARQL client, but provided for completeness.
- Parameters:
url - debugFlag - rqSummary -
- Returns:
execGetRequest
protected static String execGetRequest(org.apache.http.client.HttpClient httpCli,
String url,
org.slf4j.Logger log,
boolean debugFlag,
String rqSummary)
throws Throwable
- Not currently used by our SPARQL client, but provided for completeness.
- Parameters:
httpCli - url - log - debugFlag - rqSummary -
- Returns:
-
- Throws:
Throwable
execPost
public String execPost(String url,
List<org.apache.http.NameValuePair> nvps,
boolean debugFlag)
- Use this to exec POST on any server URL, including a SPARQL-update service!
- Parameters:
url - nvps - - parameters for the POST. Joseki likes to see one called "request" with the body of your
SPARQL-Update message.debugFlag -
- Returns:
execPostRequest
protected static String execPostRequest(org.apache.http.client.HttpClient httpCli,
String postURL,
List<org.apache.http.NameValuePair> nvps,
org.slf4j.Logger log,
boolean debugFlag)
throws Throwable
- General HTTP posting method, which we make static to emphasize that there's no hidden state in it.
- Parameters:
httpCli - postURL - nvps - log - debugFlag -
- Throws:
Throwable
extractResponseEntityText
protected static String extractResponseEntityText(org.apache.http.HttpResponse response,
org.slf4j.Logger log,
boolean debugFlag,
String rqSummary)
throws Throwable
- Extract the meaty text part of an HTTP response, optionally printing debug along the way.
- Parameters:
response - log - debugFlag - rqSummary -
- Returns:
-
- Throws:
Throwable
Copyright © 2010-2014. All Rights Reserved.