public class SesameClientImpl extends Object implements SesameClient, HttpClientDependent
HttpClient to manage HTTP connections.| Constructor and Description |
|---|
SesameClientImpl() |
SesameClientImpl(org.apache.http.impl.client.CloseableHttpClient dependentClient,
ExecutorService dependentExecutorService) |
| Modifier and Type | Method and Description |
|---|---|
SesameSession |
createSesameSession(String serverURL)
Creates a new session to the remote Sesame server to manage the auth
state.
|
SparqlSession |
createSparqlSession(String queryEndpointUrl,
String updateEndpointUrl)
Creates a new session to the remote SPARQL endpoint to manage the auth
state.
|
org.apache.http.client.HttpClient |
getHttpClient()
HttpClient that has been assigned or has been used by this object. |
void |
initialize()
(re)initializes the connection manager and HttpClient (if not already
done), for example after a shutdown has been invoked earlier.
|
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Assign an
HttpClient that this object should use. |
void |
shutDown()
Closes any remaining TCP connections and threads used by the sessions
created by this object.
|
public SesameClientImpl()
public SesameClientImpl(org.apache.http.impl.client.CloseableHttpClient dependentClient,
ExecutorService dependentExecutorService)
public org.apache.http.client.HttpClient getHttpClient()
HttpClientDependentHttpClient that has been assigned or has been used by this object.
The life cycle might not be or might be tied to this object, depending on
whether HttpClient was passed to or created by this object
respectively.getHttpClient in interface HttpClientDependentgetHttpClient in interface SesameClientpublic void setHttpClient(org.apache.http.client.HttpClient httpClient)
HttpClientDependentHttpClient that this object should use. The life cycle
of the given HttpClient is independent of this object. Closing or
shutting down this object does not have any impact on the given client.
Callers must ensure that the given client is properly closed elsewhere.setHttpClient in interface HttpClientDependenthttpClient - The httpClient to use for remote/service calls.public SparqlSession createSparqlSession(String queryEndpointUrl, String updateEndpointUrl)
SesameClientcreateSparqlSession in interface SesameClientpublic SesameSession createSesameSession(String serverURL)
SesameClientcreateSesameSession in interface SesameClientpublic void shutDown()
SesameClientshutDown in interface SesameClientpublic void initialize()
Copyright © 2001-2015 Aduna. All Rights Reserved.