Interface IServiceRegistry

  • All Known Implementing Classes:
    ServiceRegistry

    public interface IServiceRegistry
    Interface for a service registry. todo: further cleanup the interface
    • Method Detail

      • addService

        void addService​(IServiceIdentifier service)
        Add a service to the registry.
        Parameters:
        service - The service.
      • addLocalService

        void addLocalService​(IService service)
        Add a local service to the registry.
        Parameters:
        service - The local service.
      • updateService

        void updateService​(IServiceIdentifier service)
        Updates a service if the service meta-information has changes.
        Parameters:
        service - The service.
      • removeService

        void removeService​(IServiceIdentifier service)
        Remove a service from the registry.
        Parameters:
        service - The service.
      • removeServices

        void removeServices​(IComponentIdentifier platform)
        Remove services of a platform from the registry.
        Parameters:
        platform - The platform, null for everything.
      • removeQuery

        void removeQuery​(ServiceQuery<?> query)
        Remove a service query from the registry.
        Parameters:
        query - ServiceQuery.
      • removeQueries

        void removeQueries​(IComponentIdentifier owner)
        Remove all service queries of a specific component from the registry.
        Parameters:
        owner - The query owner.
      • removeQueriesOfPlatform

        void removeQueriesOfPlatform​(IComponentIdentifier platform)
        Remove all service queries of a specific platform from the registry.
        Parameters:
        platform - The platform from which the query owner comes.
      • addExcludedComponent

        void addExcludedComponent​(IComponentIdentifier cid)
        Add an excluded component.
        Parameters:
        The - component identifier.
      • removeExcludedComponent

        void removeExcludedComponent​(IComponentIdentifier cid)
        Remove an excluded component.
        Parameters:
        The - component identifier.
      • getLocalService

        IService getLocalService​(IServiceIdentifier serviceid)
        Returns the service proxy of a local service identified by service ID.
        Parameters:
        serviceid - The service ID.
        Returns:
        The service proxy.
      • getAllServices

        java.util.Set<IServiceIdentifier> getAllServices()
        Get all services.
        Returns:
        All services (copy).
      • getAllQueries

        java.util.Set<ServiceQueryInfo<?>> getAllQueries()
        Get all queries.
        Returns:
        All queries (copy).
      • getLock

        java.util.concurrent.locks.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.