com.generationjava.patterns.registry
Interface Registry

All Known Implementing Classes:
AbstractRegistry, RegistryRegistry

public interface Registry

A Container of registered objects. Objects are registered under a registration key.


Method Summary
 void clear()
          Clear the registry of values.
 java.lang.Object get(java.lang.Object key)
          Get the key registered under the specified key..
 Null getNull()
          Get the null value which will be returned when a key is requested and is not in the registry.
 RegistryFactory getRegistryFactory()
          Get the factory which will create instances of the Registry.
 java.util.Iterator keys()
          Get the list of known keys.
 void register(java.lang.Object key, java.lang.Object value)
          Registry an object under a registration key.
 void remove(java.lang.Object key)
          Remove a value from the registry for the specified key.
 void setNull(Null value)
          Set the null value which will be returned when a key is requested and is not in the registry.
 void setRegistryFactory(RegistryFactory factory)
          Set the factory which will create instances of the Registry.
 

Method Detail

setRegistryFactory

public void setRegistryFactory(RegistryFactory factory)
Set the factory which will create instances of the Registry.


getRegistryFactory

public RegistryFactory getRegistryFactory()
Get the factory which will create instances of the Registry.


register

public void register(java.lang.Object key,
                     java.lang.Object value)
Registry an object under a registration key.

Parameters:
key - Object registration key
value - Object to register

get

public java.lang.Object get(java.lang.Object key)
Get the key registered under the specified key..


clear

public void clear()
Clear the registry of values.


remove

public void remove(java.lang.Object key)
Remove a value from the registry for the specified key.


keys

public java.util.Iterator keys()
Get the list of known keys.


setNull

public void setNull(Null value)
Set the null value which will be returned when a key is requested and is not in the registry.


getNull

public Null getNull()
Get the null value which will be returned when a key is requested and is not in the registry.



Copyright © 2000-2003 GenerationJava. All Rights Reserved.