org.apache.servicemix.nmr.api.service
Interface ServiceRegistry<T>

All Known Subinterfaces:
ComponentRegistry, EndpointRegistry, FlowRegistry, ListenerRegistry, WireRegistry
All Known Implementing Classes:
ClusterEngine, ComponentRegistryImpl, EndpointRegistryImpl, FlowRegistryImpl, InternalRegistryWrapper, ListenerRegistryImpl, RegistryWrapper, ServiceRegistryImpl, WireRegistryImpl

public interface ServiceRegistry<T>

Templated registry to hold services and their associated metadata. In an OSGi environment, services would be registered and unregistered automatically using a service tracker.

Since:
4.0
Version:
$Revision: $

Method Summary
 Map<String,?> getProperties(T service)
          Retrieve the metadata associated to a registered service.
 Set<T> getServices()
          Get a set of registered services.
 void register(T service, Map<String,?> properties)
          Register a service with the given metadata.
 void unregister(T service, Map<String,?> properties)
          Unregister a previously registered service.
 

Method Detail

register

void register(T service,
              Map<String,?> properties)
Register a service with the given metadata.

Parameters:
service - the service to register
properties - the associated metadata

unregister

void unregister(T service,
                Map<String,?> properties)
Unregister a previously registered service.

Parameters:
service - the service to unregister

getServices

Set<T> getServices()
Get a set of registered services.

Returns:
the registered services

getProperties

Map<String,?> getProperties(T service)
Retrieve the metadata associated to a registered service.

Parameters:
service - the service for which to retrieve metadata
Returns:
the metadata associated with the service


Copyright © 2005-2012 FuseSource. All Rights Reserved.