nextapp.echoservlet
Class ServiceRegistry

java.lang.Object
  extended by nextapp.echoservlet.ServiceRegistry
All Implemented Interfaces:
java.io.Serializable

public class ServiceRegistry
extends java.lang.Object
implements java.io.Serializable

A registry of Service objects that may be recalled based on Id values.

See Also:
Serialized Form

Method Summary
 void add(Service service, java.lang.String alias)
          Adds an aliased service to the registry.
 void remove(Service service, java.lang.String alias)
          Removes an aliased service from the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public void add(Service service,
                java.lang.String alias)
Adds an aliased service to the registry. Aliased service are only removed when all of their aliases have been removed. This enables ancillary services to be used by multiple components.

Parameters:
service - The service to be added.
alias - The alias to use for the service.

remove

public void remove(Service service,
                   java.lang.String alias)
Removes an aliased service from the registry. Aliased service are only removed when all of their aliases have been removed. This enables ancillary services to be used by multiple components.

Parameters:
service - The service to be removed.
alias - The alias of the service.