jfun.yan
Interface Registrar

All Superinterfaces:
ComponentMap, java.io.Serializable
All Known Subinterfaces:
Container
All Known Implementing Classes:
DefaultContainer, DelegatingContainer, ImmutablePreferredContainer, InheritedRegistrar, ManualContainer, ManualWiringContainer, MonitoringContainer, ProxyContainer, SimpleContainer, SimpleRegistrar, SingletonContainer, SingletonProxyContainer, TransformingContainer

public interface Registrar
extends ComponentMap

Registrar is a mutable ComponentMap. It handles registration and unregistration of components.

Codehaus.org.

Author:
Ben Yu

Method Summary
 void registerComponent(java.lang.Object key, Component cc)
          Register a Component identified by a key.
 void unregisterComponent(java.lang.Object key)
          Unregister a component identified by a key.
 void unregisterComponentsOfType(java.lang.Class type)
          Unregister components of a certain type.
 void verify(ComponentMap cmap)
          Verifies that all the registered components can be satisfied.
 
Methods inherited from interface jfun.yan.ComponentMap
containsKey, containsType, getComponent, getComponentOfType, getComponents, getComponentsOfType, getDependency, getDependencyOfType, keys
 

Method Detail

registerComponent

void registerComponent(java.lang.Object key,
                       Component cc)
Register a Component identified by a key.

Parameters:
key - the component key.
cc - the component.

unregisterComponent

void unregisterComponent(java.lang.Object key)
Unregister a component identified by a key.

Parameters:
key - the component key.

unregisterComponentsOfType

void unregisterComponentsOfType(java.lang.Class type)
Unregister components of a certain type.

Parameters:
type - the component instance type.

verify

void verify(ComponentMap cmap)
Verifies that all the registered components can be satisfied.

Parameters:
cmap - the ComponentMap from which the parts of the registered components are obtained.