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()
HttpClientDependent
HttpClient
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 HttpClientDependent
getHttpClient
in interface SesameClient
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
HttpClientDependent
HttpClient
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 HttpClientDependent
httpClient
- The httpClient to use for remote/service calls.public SparqlSession createSparqlSession(String queryEndpointUrl, String updateEndpointUrl)
SesameClient
createSparqlSession
in interface SesameClient
public SesameSession createSesameSession(String serverURL)
SesameClient
createSesameSession
in interface SesameClient
public void shutDown()
SesameClient
shutDown
in interface SesameClient
public void initialize()
Copyright © 2001-2016 Aduna. All Rights Reserved.