Class DelegateFederatedServiceResolver
- java.lang.Object
-
- org.eclipse.rdf4j.query.algebra.evaluation.federation.AbstractFederatedServiceResolver
-
- org.eclipse.rdf4j.federated.evaluation.DelegateFederatedServiceResolver
-
- All Implemented Interfaces:
FederatedServiceResolver
public class DelegateFederatedServiceResolver extends AbstractFederatedServiceResolver
AFederatedServiceResolver
which redirects SERVICE requests to the federation member (if the SERVICE IRI correspond to a member) or to the provided delegate.- Author:
- as
-
-
Field Summary
-
Fields inherited from class org.eclipse.rdf4j.query.algebra.evaluation.federation.AbstractFederatedServiceResolver
endpointToService
-
-
Constructor Summary
Constructors Constructor Description DelegateFederatedServiceResolver(EndpointManager endpointManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FederatedService
createService(String serviceUrl)
Create a newFederatedService
for the given serviceUrl.FederatedService
getService(String serviceUrl)
Retrieve theFederatedService
registered for serviceUrl.void
initialize()
protected boolean
isFedXEndpoint(String serviceUrl)
void
setDelegate(FederatedServiceResolver federatedServiceResolver)
void
shutDown()
-
Methods inherited from class org.eclipse.rdf4j.query.algebra.evaluation.federation.AbstractFederatedServiceResolver
hasService, registerService, unregisterAll, unregisterService
-
-
-
-
Constructor Detail
-
DelegateFederatedServiceResolver
public DelegateFederatedServiceResolver(EndpointManager endpointManager)
-
-
Method Detail
-
initialize
public void initialize()
-
shutDown
public void shutDown()
- Overrides:
shutDown
in classAbstractFederatedServiceResolver
-
setDelegate
public void setDelegate(FederatedServiceResolver federatedServiceResolver)
-
getService
public FederatedService getService(String serviceUrl) throws QueryEvaluationException
Description copied from class:AbstractFederatedServiceResolver
Retrieve theFederatedService
registered for serviceUrl. If there is no service registered for serviceUrl, a newFederatedService
is created and registered.- Specified by:
getService
in interfaceFederatedServiceResolver
- Overrides:
getService
in classAbstractFederatedServiceResolver
- Parameters:
serviceUrl
- locator for the federation service- Returns:
- the
FederatedService
, created fresh if necessary - Throws:
QueryEvaluationException
- If there was an exception generated while retrieving the service.
-
createService
protected FederatedService createService(String serviceUrl) throws QueryEvaluationException
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
-
isFedXEndpoint
protected boolean isFedXEndpoint(String serviceUrl)
-
-