org.jboss.media.util.registry
Interface Registry

All Known Implementing Classes:
MapRegistry (src)

public interface Registry

A registry.


Method Summary
 void bind(java.lang.Object key, java.lang.Object value)
          Binds the given key with the given value.
 java.util.Iterator keyIterator()
          Obtains an Iterator for all the keys in the registry.
 java.lang.Object lookup(java.lang.Object key)
          Lookups a value with the given key.
 void rebind(java.lang.Object key, java.lang.Object value)
          Rebinds the given key with the given value.
 java.lang.Object unbind(java.lang.Object key)
          Unbinds a value with the given key.
 

Method Detail

bind

public void bind(java.lang.Object key,
                 java.lang.Object value)
          throws ObjectAlreadyBoundException (src) 
Binds the given key with the given value.

Throws:
ObjectAlreadyBoundException (src) - if there is another value already bound for that key.

rebind

public void rebind(java.lang.Object key,
                   java.lang.Object value)
Rebinds the given key with the given value.


unbind

public java.lang.Object unbind(java.lang.Object key)
                        throws ObjectNotBoundException (src) 
Unbinds a value with the given key.

Returns:
value unbound.
Throws:
ObjectNotBoundException (src) - if there is no value bound to the key.

lookup

public java.lang.Object lookup(java.lang.Object key)
                        throws ObjectNotBoundException (src) 
Lookups a value with the given key.

Returns:
value obtained.
Throws:
ObjectNotBoundException (src) - if there is no value bound to the key.

keyIterator

public java.util.Iterator keyIterator()
Obtains an Iterator for all the keys in the registry.

Returns:
keys iterator.