com.shimari.framework
Class Registry

java.lang.Object
  extended bycom.shimari.framework.Registry

public class Registry
extends java.lang.Object

Registry lists all the components loaded by a Config system and is passed in the init method of a Component to enable Components to look each other up.


Constructor Summary
Registry()
           
 
Method Summary
protected  void addComponent(java.lang.String name, Component c)
           
 java.util.Collection components()
           
 boolean containsKey(java.lang.String name)
           
 Component getComponent(java.lang.String name)
           
 void initAll()
          Before a component can be used it must be initialized.
 java.util.Set keys()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Registry

public Registry()
Method Detail

getComponent

public Component getComponent(java.lang.String name)
                       throws ConfigException
Throws:
ConfigException

containsKey

public boolean containsKey(java.lang.String name)

addComponent

protected void addComponent(java.lang.String name,
                            Component c)

keys

public java.util.Set keys()

components

public java.util.Collection components()

initAll

public void initAll()
             throws ConfigException
Before a component can be used it must be initialized. You can use this method to initialize all of the components which have not yet been initialized. It is safe to run multiple times: each component will only be initialized just once. Do not call this method until all components have been loaded.

Throws:
ConfigException