Class SPARQLServiceResolver
java.lang.Object
org.eclipse.rdf4j.query.algebra.evaluation.federation.AbstractFederatedServiceResolver
org.eclipse.rdf4j.repository.sparql.federation.SPARQLServiceResolver
- All Implemented Interfaces:
HttpClientDependent
,SessionManagerDependent
,FederatedServiceResolver
public class SPARQLServiceResolver
extends AbstractFederatedServiceResolver
implements FederatedServiceResolver, HttpClientDependent, SessionManagerDependent
The
SPARQLServiceResolver
is used to manage a set of FederatedService
instances, which are used to
evaluate SERVICE expressions for particular service Urls.
Lookup can be done via the serviceUrl using the method AbstractFederatedServiceResolver.getService(String)
. If there is no service for the
specified url, a SPARQLFederatedService
is created and registered for future use.
- Author:
- Andreas Schwarte, James Leigh
-
Field Summary
Fields inherited from class org.eclipse.rdf4j.query.algebra.evaluation.federation.AbstractFederatedServiceResolver
endpointToService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected FederatedService
createService
(String serviceUrl) Create a newFederatedService
for the given serviceUrl.org.apache.http.client.HttpClient
HttpClient
that has been assigned or has been used by this object.HttpClientSessionManager
that has been assigned or has been used by this object.void
setHttpClient
(org.apache.http.client.HttpClient httpClient) Assign anHttpClient
that this object should use.void
Assign anHttpClientSessionManager
that this object should use.void
shutDown()
Methods inherited from class org.eclipse.rdf4j.query.algebra.evaluation.federation.AbstractFederatedServiceResolver
getService, hasService, registerService, unregisterAll, unregisterService
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServiceResolver
getService
-
Constructor Details
-
SPARQLServiceResolver
public SPARQLServiceResolver()
-
-
Method Details
-
getHttpClientSessionManager
Description copied from interface:SessionManagerDependent
HttpClientSessionManager
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 whetherHttpClientSessionManager
was passed to or created by this object respectively.- Specified by:
getHttpClientSessionManager
in interfaceSessionManagerDependent
- Returns:
- a
HttpClientSessionManager
instance or null
-
setHttpClientSessionManager
Description copied from interface:SessionManagerDependent
Assign anHttpClientSessionManager
that this object should use. The life cycle of the givenHttpClientSessionManager
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.- Specified by:
setHttpClientSessionManager
in interfaceSessionManagerDependent
-
getHttpClient
public org.apache.http.client.HttpClient getHttpClient()Description copied from interface: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 whetherHttpClient
was passed to or created by this object respectively.- Specified by:
getHttpClient
in interfaceHttpClientDependent
- Returns:
- an
HttpClient
instance or null
-
setHttpClient
public void setHttpClient(org.apache.http.client.HttpClient httpClient) Description copied from interface:HttpClientDependent
Assign anHttpClient
that this object should use. The life cycle of the givenHttpClient
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.- Specified by:
setHttpClient
in interfaceHttpClientDependent
-
createService
Description copied from class:AbstractFederatedServiceResolver
Create a newFederatedService
for the given serviceUrl. This method is invoked, if noFederatedService
has been created yet for the serviceUrl.- Specified by:
createService
in classAbstractFederatedServiceResolver
- Parameters:
serviceUrl
- the service IRI- Returns:
- a non-null
FederatedService
- Throws:
QueryEvaluationException
-
shutDown
public void shutDown()- Overrides:
shutDown
in classAbstractFederatedServiceResolver
-