Interface IServiceRegistry
- All Known Implementing Classes:
ServiceRegistry
public interface IServiceRegistry
Interface for a service registry.
todo: further cleanup the interface
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLocalService
(IService service) Add a local service to the registry.<T> jadex.future.ISubscriptionIntermediateFuture
<T> addQuery
(ServiceQuery<T> query) Add a service query to the registry.void
addService
(IServiceIdentifier service) Add a service to the registry.Set
<ServiceQueryInfo<?>> Get all queries.Get all services.getLocalService
(IServiceIdentifier serviceid) Returns the service proxy of a local service identified by service ID.getLock()
Returns the lock on the registry.void
removeQuery
(ServiceQuery<?> query) Remove a service query from the registry.void
removeService
(IServiceIdentifier service) Remove a service from the registry.searchService
(ServiceQuery<?> query) Search for a service.searchServices
(ServiceQuery<?> query) Search for services.jadex.future.ISubscriptionIntermediateFuture
<QueryEvent> Subscribe for query events.void
updateService
(IServiceIdentifier service) Updates a service if the service meta-information has changes.
-
Method Details
-
searchService
Search for a service. -
searchServices
Search for services. -
addService
Add a service to the registry.- Parameters:
service
- The service.
-
addLocalService
Add a local service to the registry.- Parameters:
service
- The local service.
-
updateService
Updates a service if the service meta-information has changes.- Parameters:
service
- The service.
-
removeService
Remove a service from the registry.- Parameters:
service
- The service.
-
addQuery
Add a service query to the registry.- Parameters:
query
- ServiceQuery.
-
removeQuery
Remove a service query from the registry.- Parameters:
query
- ServiceQuery.
-
getLocalService
Returns the service proxy of a local service identified by service ID.- Parameters:
serviceid
- The service ID.- Returns:
- The service proxy.
-
getAllServices
Set<IServiceIdentifier> getAllServices()Get all services.- Returns:
- All services (copy).
-
getAllQueries
Set<ServiceQueryInfo<?>> getAllQueries()Get all queries.- Returns:
- All queries (copy).
-
subscribeToQueries
jadex.future.ISubscriptionIntermediateFuture<QueryEvent> subscribeToQueries()Subscribe for query events. -
getLock
ReadWriteLock getLock()Returns the lock on the registry. Care must be taken to perform proper unlocking to avoid permanently blocking the registry. Note that the lock is reentrant, so operations can be performed while the lock is held.- Returns:
- The registry lock.
-