KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > NamingManager


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise;
24
25 import javax.naming.*;
26 import java.util.Hashtable JavaDoc;
27 import com.sun.enterprise.deployment.*;
28
29 /**
30  * The NamingManager provides an interface for various components to
31  * use naming functionality. It provides methods for binding and unbinding
32  * environment properties, resource and ejb references. It also provides
33  * an API to get the current component id.
34  * @author Vivek Nagar
35  */

36 public interface NamingManager {
37
38     /**
39      * Get the initial context.
40      */

41
42     public Context getInitialContext();
43
44     /**
45      * Publish a name in the naming service.
46      * @param the Object that needs to be bound.
47      * @param the Name that the object is bound as.
48      * @param if operation is a bind or a rebind.
49      * @exception Exception
50      */

51
52      public void publishObject(String JavaDoc name, Object JavaDoc obj, boolean rebind)
53     throws NamingException;
54
55     /**
56      * Publish a name in the naming service.
57      * @param the Object that needs to be bound.
58      * @param the Name that the object is bound as.
59      * @param if operation is a bind or a rebind.
60      * @exception Exception
61      */

62
63      public void publishObject(Name name, Object JavaDoc obj, boolean rebind)
64     throws NamingException;
65
66     /**
67      * Remove an object from the naming service.
68      * @param the Name that the object is bound as.
69      * @exception Exception
70      */

71      public void unpublishObject(String JavaDoc name)
72     throws NamingException;
73
74     /**
75      * Remove an object from the naming service.
76      * @param the Name that the object is bound as.
77      * @exception Exception
78      */

79      public void unpublishObject(Name name)
80     throws NamingException;
81
82     /**
83      * Enumerates over the list of env props, resource and ejb references
84      * and binds them in the java:comp namespace.
85      */

86      public String JavaDoc bindObjects(JndiNameEnvironment env) throws NamingException;
87
88     /**
89      * Enumerates over the list of env props, resource and ejb references
90      * and unbinds them from the java:comp namespace.
91      */

92      public void unbindObjects(JndiNameEnvironment env) throws NamingException;
93
94     /**
95      * Recreate a context for java:comp/env or one of its sub-contexts given
96      * the context name.
97      */

98     public Context restoreJavaCompEnvContext(String JavaDoc contextName) throws NamingException;
99 }
100
Popular Tags