001    package org.hornetq.spi.core.naming;
002    
003    /**
004     * Abstract interface for a registry to store endpoints like connection factories into.
005     *
006     * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
007     * @version $Revision: 1 $
008     */
009    public interface BindingRegistry
010    {
011       /** The context used by the registry.
012        *   This may be used to setup the JNDI Context on the JNDI Registry.
013        *   We keep it as an object here as the interface needs to be generic
014        *   as this could be reused by others Registries (e.g set/get the Map on MapRegistry)
015        * @return
016        */
017       Object getContext();
018       
019       void setContext(Object ctx);
020       
021       Object lookup(String name);
022    
023       boolean bind(String name, Object obj);
024    
025       void unbind(String name);
026    
027       void close();
028    }