public class FederatedServiceManager extends Object
FederatedServiceManager
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
getService(String)
. If there is no service for the specified url, a
SPARQLFederatedService
is created and registered for future use.
Note that this manager can be used to register custom
FederatedService
implementations to provide custom behavior for
SERVICE evaluation.
The default behavior can be changed by extending from this class and setting
the implementation class via setImplementationClass(Class)
. The new
class must provide the default constructor.
Constructor and Description |
---|
FederatedServiceManager() |
Modifier and Type | Method and Description |
---|---|
static FederatedServiceManager |
getInstance() |
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.
|
static void |
setImplementationClass(Class<? extends FederatedServiceManager> implementationClass) |
void |
unregisterAll() |
void |
unregisterService(String serviceUrl)
Unregister a service registered to serviceURl
|
public static FederatedServiceManager getInstance()
public static void setImplementationClass(Class<? extends FederatedServiceManager> implementationClass)
public void registerService(String serviceUrl, FederatedService service)
serviceUrl
- service
- public void unregisterService(String serviceUrl)
serviceUrl
- public FederatedService getService(String serviceUrl) throws RepositoryException
FederatedService
registered for serviceUrl. If there
is no service registered for serviceUrl, a new
SPARQLFederatedService
is created and registered.serviceUrl
- locator for the federation serviceFederatedService
, created fresh if necessaryRepositoryException
public void unregisterAll()
Copyright © 2001-2016 Aduna. All Rights Reserved.