public abstract class FederatedServiceResolverBase extends Object implements FederatedServiceResolver
FederatedServiceResolver
which takes care for lifecycle
management of produced FederatedService
s.
Specific implementation can implement createService(String)
.
Modifier and Type | Field and Description |
---|---|
protected Map<String,FederatedService> |
endpointToService
Map service URL to the corresponding initialized
FederatedService |
Constructor and Description |
---|
FederatedServiceResolverBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract FederatedService |
createService(String serviceUrl)
Create a new
FederatedService for the given serviceUrl. |
FederatedService |
getService(String serviceUrl)
Retrieve the
FederatedService registered for serviceUrl. |
void |
registerService(String serviceUrl,
FederatedService service)
Register the specified service to evaluate SERVICE expressions for the
given url.
|
void |
shutDown() |
void |
unregisterAll() |
void |
unregisterService(String serviceUrl)
Unregister a service registered to serviceURl
|
protected Map<String,FederatedService> endpointToService
FederatedService
public void registerService(String serviceUrl, FederatedService service)
serviceUrl
- service
- public void unregisterService(String serviceUrl)
serviceUrl
- public FederatedService getService(String serviceUrl) throws QueryEvaluationException
FederatedService
registered for serviceUrl. If there
is no service registered for serviceUrl, a new
FederatedService
is created and registered.getService
in interface FederatedServiceResolver
serviceUrl
- locator for the federation serviceFederatedService
, created fresh if necessaryRepositoryException
QueryEvaluationException
- If there was an exception generated while retrieving the service.protected abstract FederatedService createService(String serviceUrl) throws QueryEvaluationException
FederatedService
for the given serviceUrl. This method
is invoked, if no FederatedService
has been created yet for the
serviceUrl.serviceUrl
- the service IRIFederatedService
QueryEvaluationException
public void unregisterAll()
public void shutDown()
Copyright © 2001-2016 Aduna. All Rights Reserved.