KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > naming > cosnaming > NamingContextDataStore


1 /*
2  * @(#)NamingContextDataStore.java 1.20 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.naming.cosnaming;
9
10 // Import general CORBA classes
11
import org.omg.CORBA.Object JavaDoc;
12
13 // Import org.omg.CosNaming classes
14
import org.omg.CosNaming.BindingType JavaDoc;
15 import org.omg.CosNaming.BindingTypeHolder JavaDoc;
16 import org.omg.CosNaming.BindingListHolder JavaDoc;
17 import org.omg.CosNaming.BindingIteratorHolder JavaDoc;
18 import org.omg.CosNaming.NameComponent JavaDoc;
19 import org.omg.CosNaming.NamingContext JavaDoc;
20 import org.omg.PortableServer.POA JavaDoc;
21
22 /**
23  * This interface defines a set of methods that must be implemented by the
24  * "data store" associated with a NamingContext implementation.
25  * It allows for different implementations of naming contexts that
26  * support the same API but differ in storage mechanism.
27  */

28 public interface NamingContextDataStore {
29     /**
30      * Method which implements binding a name to an object as
31      * the specified binding type.
32      * @param n a NameComponent which is the name under which the object
33      * will be bound.
34      * @param obj the object reference to be bound.
35      * @param bt Type of binding (as object or as context).
36      * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions.
37      */

38     void Bind(NameComponent JavaDoc n, org.omg.CORBA.Object JavaDoc obj, BindingType JavaDoc bt)
39     throws org.omg.CORBA.SystemException JavaDoc;
40
41     /**
42      * Method which implements resolving the specified name,
43      * returning the type of the binding and the bound object reference.
44      * If the id and kind of the NameComponent are both empty, the initial
45      * naming context (i.e., the local root) must be returned.
46      * @param n a NameComponent which is the name to be resolved.
47      * @param bth the BindingType as an out parameter.
48      * @return the object reference bound under the supplied name.
49      * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions.
50      */

51     org.omg.CORBA.Object JavaDoc Resolve(NameComponent JavaDoc n,BindingTypeHolder JavaDoc bth)
52     throws org.omg.CORBA.SystemException JavaDoc;
53
54     /**
55      * Method which implements unbinding a name.
56      * @return the object reference bound to the name, or null if not found.
57      * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions.
58      */

59     org.omg.CORBA.Object JavaDoc Unbind(NameComponent JavaDoc n)
60     throws org.omg.CORBA.SystemException JavaDoc;
61
62     /**
63      * Method which implements listing the contents of this
64      * NamingContext and return a binding list and a binding iterator.
65      * @param how_many The number of requested bindings in the BindingList.
66      * @param bl The BindingList as an out parameter.
67      * @param bi The BindingIterator as an out parameter.
68      * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions.
69      */

70     void List(int how_many, BindingListHolder JavaDoc bl, BindingIteratorHolder JavaDoc bi)
71     throws org.omg.CORBA.SystemException JavaDoc;
72
73     /**
74      * Method which implements creating a new NamingContext.
75      * @return an object reference for a new NamingContext object implemented
76      * by this Name Server.
77      * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions.
78      */

79     NamingContext JavaDoc NewContext()
80     throws org.omg.CORBA.SystemException JavaDoc;
81
82     /**
83      * Method which implements destroying this NamingContext.
84      * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions.
85      */

86     void Destroy()
87     throws org.omg.CORBA.SystemException JavaDoc;
88   
89     /**
90      * Method which returns whether this NamingContext is empty
91      * or not.
92      * @return true if this NamingContext contains no bindings.
93      */

94     boolean IsEmpty();
95
96     POA JavaDoc getNSPOA( );
97 }
98
Popular Tags