public class SharedHttpClientSessionManager extends Object implements HttpClientSessionManager, HttpClientDependent
HttpClient to manage HTTP connections.| Modifier and Type | Field and Description |
|---|---|
static String |
CORE_POOL_SIZE_PROPERTY
Configurable system property
org.eclipse.rdf4j.client.executors.corePoolSize for specifying the
background executor core thread pool size. |
| Constructor and Description |
|---|
SharedHttpClientSessionManager() |
SharedHttpClientSessionManager(org.apache.http.impl.client.CloseableHttpClient dependentClient,
ScheduledExecutorService dependentExecutorService) |
| Modifier and Type | Method and Description |
|---|---|
RDF4JProtocolSession |
createRDF4JProtocolSession(String serverURL)
Creates a new session to the remote RDF4J REST API.
|
SPARQLProtocolSession |
createSPARQLProtocolSession(String queryEndpointUrl,
String updateEndpointUrl)
Creates a new SPARQL Protocol session to the remote SPARQL endpoint.
|
protected ScheduledExecutorService |
getExecutorService()
Get the
ScheduledExecutorService used by this session manager. |
org.apache.http.client.HttpClient |
getHttpClient()
HttpClient that has been assigned or has been used by this object. |
void |
initialize()
Deprecated.
Create a new instance instead of trying to reactivate an old instance.
|
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Assign an
HttpClient that this object should use. |
void |
setHttpClientBuilder(org.apache.http.impl.client.HttpClientBuilder httpClientBuilder)
Set an optional
HttpClientBuilder to create the inner httpClient (if the latter is not provided
externally as dependent client). |
void |
shutDown()
Closes any remaining connections and threads used by the sessions created by this object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateSesameSession, createSparqlSessionpublic static final String CORE_POOL_SIZE_PROPERTY
org.eclipse.rdf4j.client.executors.corePoolSize for specifying the
background executor core thread pool size.public SharedHttpClientSessionManager()
public SharedHttpClientSessionManager(org.apache.http.impl.client.CloseableHttpClient dependentClient,
ScheduledExecutorService 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 HttpClientSessionManagergetHttpClient 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 void setHttpClientBuilder(org.apache.http.impl.client.HttpClientBuilder httpClientBuilder)
HttpClientBuilder to create the inner httpClient (if the latter is not provided
externally as dependent client).httpClientBuilder - the builder for the managed HttpClientHttpClientBuilderspublic SPARQLProtocolSession createSPARQLProtocolSession(String queryEndpointUrl, String updateEndpointUrl)
HttpClientSessionManagercreateSPARQLProtocolSession in interface HttpClientSessionManagercreateSPARQLProtocolSession in interface SesameClientpublic RDF4JProtocolSession createRDF4JProtocolSession(String serverURL)
HttpClientSessionManagercreateRDF4JProtocolSession in interface HttpClientSessionManagercreateRDF4JProtocolSession in interface SesameClientpublic void shutDown()
HttpClientSessionManagershutDown in interface HttpClientSessionManagershutDown in interface SesameClient@Deprecated public void initialize()
protected final ScheduledExecutorService getExecutorService()
ScheduledExecutorService used by this session manager.ScheduledExecutorService used by all SPARQLProtocolSession and
RDF4JProtocolSession instances created by this session manager.Copyright © 2015-2021 Eclipse Foundation. All Rights Reserved.