1CosNaming_NamingContext(3) Erlang Module Definition CosNaming_NamingContext(3)
2
3
4

NAME

6       CosNaming_NamingContext  -  This  interface supports different bind and
7       access functions for names in a context.
8

DESCRIPTION

10       This is the object that defines  name  scopes,  names  must  be  unique
11       within  a naming context. Objects may have multiple names and may exist
12       in multiple naming contexts. Name context may be named  in  other  con‐
13       texts and cycles are permitted.
14
15       The type NameComponent used below is defined as:
16
17       -record('CosNaming_NameComponent', {id, kind=""}).
18
19       where id and kind are strings.
20
21       The type Binding used below is defined as:
22
23       -record('CosNaming_Binding', {binding_name, binding_type}).
24
25       where  binding_name is a Name and binding_type is an enum which has the
26       values nobject and ncontext.
27
28       Both these records are defined in the  file  CosNaming.hrl  and  it  is
29       included with:
30
31       -include_lib("orber/COSS/CosNaming/CosNaming.hrl").
32
33       There are a number of exceptions that can be returned from functions in
34       this interface.
35
36         * NotFound is defined as
37
38         -record('CosNaming_NamingContext_NotFound',
39                 {rest_of_name, why}).
40
41         * CannotProceed is defined as
42
43         -record('CosNaming_NamingContext_CannotProceed',
44                 {rest_of_name, cxt}).
45
46
47         * InvalidName is defined as
48
49         -record('CosNaming_NamingContext_InvalidName', {}).
50
51
52         * NotFound is defined as
53
54         -record('CosNaming_NamingContext_NotFound', {}).
55
56         * AlreadyBound is defined as
57
58         -record('CosNaming_NamingContext_AlreadyBound', {}).
59
60         * NotEmpty is defined as
61
62         -record('CosNaming_NamingContext_NotEmpty', {}).
63
64       These exceptions are defined in  the  file  CosNaming_NamingContext.hrl
65       and it is included with:
66
67       -include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl").
68
69

EXPORTS

71       bind(NamingContext, Name, Object) -> Return
72
73              Types:
74
75                 NameContext = #objref
76                 Name = [NameComponent]
77                 Object = #objref
78                 Return = ok
79
80              Creates a binding of a name and an object in the naming context.
81              Naming contexts that are bound using bind() do  not  participate
82              in name resolution.
83
84       rebind(NamingContext, Name, Object) -> Return
85
86              Types:
87
88                 NamingContext = #objref
89                 Name = [NameComponent]
90                 Object = #objref
91                 Return = ok
92
93              Creates  a binding of a name and an object in the naming context
94              even if the name is already  bound.  Naming  contexts  that  are
95              bound using rebind() do not participate in name resolution.
96
97       bind_context(NamingContext1, Name, NamingContex2) -> Return
98
99              Types:
100
101                 NamingContext1 = NamingContext2 =#objref
102                 Name = [NameComponent]
103                 Return = ok
104
105              The bind_context function creates a binding of a name and a nam‐
106              ing context in the current context.  Naming  contexts  that  are
107              bound using bind_context() participate in name resolution.
108
109       rebind_context(NamingContext1, Name, NamingContex2) -> Return
110
111              Types:
112
113                 NamingContext1 = NamingContext2 =#objref
114                 Name = [NameComponent]
115                 Return = ok
116
117              The  rebind_context  function  creates a binding of a name and a
118              naming context in the current context even if the  name  already
119              is  bound. Naming contexts that are bound using rebind_context()
120              participate in name resolution.
121
122       resolve(NamingContext, Name) -> Return
123
124              Types:
125
126                 NamingContext = #objref
127                 Name = [NameComponent]
128                 Return = Object
129                 Object = #objref
130
131              The resolve function is the way to retrieve an object bound to a
132              name  in  the  naming context. The given name must match exactly
133              the bound name. The type of the object is not returned,  clients
134              are responsible for narrowing the object to the correct type.
135
136       unbind(NamingContext, Name) -> Return
137
138              Types:
139
140                 NamingContext = #objref
141                 Name = [NameComponent]
142                 Return = ok
143
144              The unbind operation removes a name binding from the naming con‐
145              text.
146
147       new_context(NamingContext) -> Return
148
149              Types:
150
151                 NamingContext = #objref
152                 Return = #objref
153
154              The new_context operation creates a new naming context.
155
156       bind_new_context(NamingContext, Name) -> Return
157
158              Types:
159
160                 NamingContext = #objref
161                 Name = [NameComponent]
162                 Return = #objref
163
164              The new_context operation creates a new naming context and binds
165              it to Name in the current context.
166
167       destroy(NamingContext) -> Return
168
169              Types:
170
171                 NamingContext = #objref
172                 Return = ok
173
174              The  destroy  operation  disposes  the  NamingContext object and
175              removes it from the name server. The context must be empty  e.g.
176              not contain any bindings to be removed.
177
178       list(NamingContext, HowMany) -> Return
179
180              Types:
181
182                 NamingContext = #objref
183                 HowMany = int()
184                 Return = {ok, BindingList, BindingIterator}
185                 BindingList = [Binding]
186                 BindingIterator = #objref
187
188              The  list operation returns a BindingList with a number of bind‐
189              ings up-to HowMany from the context. It also returns a BindinIt‐
190              erator  which can be used to step through the list. If the total
191              number of existing bindings are less than, or equal to, the How‐
192              Many parameter a NIL object reference is returned.
193
194          Note:
195              One  must destroy the BindingIterator, unless it is a NIL object
196              reference, by using 'BindingIterator':destroy().  Otherwise  one
197              can get dangling objects.
198
199
200
201
202Ericsson AB                       orber 4.5.2       CosNaming_NamingContext(3)
Impressum