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 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FederatedServicecreateService(String serviceUrl) Create a newFederatedServicefor the given serviceUrl.org.apache.http.client.HttpClientHttpClientthat has been assigned or has been used by this object.HttpClientSessionManagerthat has been assigned or has been used by this object.voidsetHttpClient(org.apache.http.client.HttpClient httpClient) Assign anHttpClientthat this object should use.voidAssign anHttpClientSessionManagerthat this object should use.voidshutDown()Methods inherited from class org.eclipse.rdf4j.query.algebra.evaluation.federation.AbstractFederatedServiceResolver
getService, hasService, registerService, unregisterAll, unregisterService
-
Constructor Details
-
SPARQLServiceResolver
public SPARQLServiceResolver()
-
-
Method Details
-
getHttpClientSessionManager
Description copied from interface:SessionManagerDependentHttpClientSessionManagerthat 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 whetherHttpClientSessionManagerwas passed to or created by this object respectively.- Specified by:
getHttpClientSessionManagerin interfaceSessionManagerDependent- Returns:
- a
HttpClientSessionManagerinstance or null
-
setHttpClientSessionManager
Description copied from interface:SessionManagerDependentAssign anHttpClientSessionManagerthat this object should use. The life cycle of the givenHttpClientSessionManageris 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:
setHttpClientSessionManagerin interfaceSessionManagerDependent
-
getHttpClient
public org.apache.http.client.HttpClient getHttpClient()Description copied from interface:HttpClientDependentHttpClientthat 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 whetherHttpClientwas passed to or created by this object respectively.- Specified by:
getHttpClientin interfaceHttpClientDependent- Returns:
- an
HttpClientinstance or null
-
setHttpClient
public void setHttpClient(org.apache.http.client.HttpClient httpClient) Description copied from interface:HttpClientDependentAssign anHttpClientthat this object should use. The life cycle of the givenHttpClientis 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:
setHttpClientin interfaceHttpClientDependent
-
createService
Description copied from class:AbstractFederatedServiceResolverCreate a newFederatedServicefor the given serviceUrl. This method is invoked, if noFederatedServicehas been created yet for the serviceUrl.- Specified by:
createServicein classAbstractFederatedServiceResolver- Parameters:
serviceUrl- the service IRI- Returns:
- a non-null
FederatedService - Throws:
QueryEvaluationException
-
shutDown
public void shutDown()- Overrides:
shutDownin classAbstractFederatedServiceResolver
-