public abstract class AbstractFederatedServiceResolver 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 |
---|
AbstractFederatedServiceResolver() |
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. |
boolean |
hasService(String serviceUrl)
Verify if a registered
FederatedService exists for the given serviceUrul. |
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.public boolean hasService(String serviceUrl)
FederatedService
exists for the given serviceUrul.serviceUrl
- locator for the federation service.true
iff the FederatedService has been registered, false
otherwise.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 © 2015-2019 Eclipse Foundation. All Rights Reserved.