/* JFox, the OpenSource J2EE Application Server
 *
 * Distributable under GNU LGPL license by gun.org
 * more details please visit http://www.huihoo.org/jfox
 */

package org.jfox.jndi;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;

/**
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */


public interface NamingService extends Remote {
    public void bind(Context ctx, Name name, Object obj, String className) throws NamingException, RemoteException;

    public void rebind(Context ctx, Name name, Object obj, String className) throws NamingException, RemoteException;

    public void unbind(Context ctx, Name name) throws NamingException, RemoteException;

    public Object lookup(Name name) throws NamingException, RemoteException;

    public Object lookupLink(Name name) throws NamingException, RemoteException;

    public List list(Context ctx, Name name) throws NamingException, RemoteException;

    public List listBindings(Context ctx, Name name) throws NamingException, RemoteException;

    public Context createSubcontext(Context ctx, Name name) throws NamingException, RemoteException;

    // destory empty sub context
    public void destroySubcontext(Context ctx, Name name) throws NamingException, RemoteException;

    // close context and destory all it's sub name and context
    public void closeSubcontext(Context ctx, Name name) throws NamingException, RemoteException;

    public boolean isBound(Name name) throws RemoteException;
}
