1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304
|
.TH CosNaming_NamingContext 3 "orber 3.6.9" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
CosNaming_NamingContext \- This interface supports different bind and access functions for names in a context\&.
.SH DESCRIPTION
.LP
This is the object that defines name scopes, names must be unique within a naming context\&. Objects may have multiple names and may exist in multiple naming contexts\&. Name context may be named in other contexts and cycles are permitted\&.
.LP
The type \fINameComponent\fR used below is defined as:
.nf
-record(\&'CosNaming_NameComponent\&', {id, kind=""})\&.
.fi
.LP
where \fIid\fR and \fIkind\fR are strings\&.
.LP
The type \fIBinding\fR used below is defined as:
.nf
-record(\&'CosNaming_Binding\&', {binding_name, binding_type})\&.
.fi
.LP
where \fIbinding_name\fR is a Name and \fIbinding_type\fR is an enum which has the values \fInobject\fR and \fIncontext\fR\&.
.LP
Both these records are defined in the file \fICosNaming\&.hrl\fR and it is included with:
.nf
-include_lib("orber/COSS/CosNaming/CosNaming\&.hrl")\&.
.fi
.LP
There are a number of exceptions that can be returned from functions in this interface\&.
.RS 2
.TP 2
*
NotFound is defined as
.RS 2
.LP
.nf
-record(\&'CosNaming_NamingContext_NotFound\&',
{rest_of_name, why})\&.
.fi
.RE
.TP 2
*
CannotProceed is defined as
.RS 2
.LP
.nf
-record(\&'CosNaming_NamingContext_CannotProceed\&',
{rest_of_name, cxt})\&.
.fi
.RE
.TP 2
*
InvalidName is defined as
.RS 2
.LP
.nf
-record(\&'CosNaming_NamingContext_InvalidName\&', {})\&.
.fi
.RE
.TP 2
*
NotFound is defined as
.RS 2
.LP
.nf
-record(\&'CosNaming_NamingContext_NotFound\&', {})\&.
.fi
.RE
.TP 2
*
AlreadyBound is defined as
.RS 2
.LP
.nf
-record(\&'CosNaming_NamingContext_AlreadyBound\&', {})\&.
.fi
.RE
.TP 2
*
NotEmpty is defined as
.RS 2
.LP
.nf
-record(\&'CosNaming_NamingContext_NotEmpty\&', {)\&.
.fi
.RE
.RE
.LP
These exceptions are defined in the file \fICosNaming_NamingContext\&.hrl\fR and it is included with:
.nf
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContext\&.hrl")\&.
.fi
.SH EXPORTS
.LP
.B
bind(NamingContext, Name, Object) -> Return
.br
.RS
.TP
Types
NameContext = #objref
.br
Name = [NameComponent]
.br
Object = #objref
.br
Return = ok
.br
.RE
.RS
.LP
Creates a binding of a name and an object in the naming context\&. Naming contexts that are bound using \fIbind()\fR do not participate in name resolution\&.
.RE
.LP
.B
rebind(NamingContext, Name, Object) -> Return
.br
.RS
.TP
Types
NamingContext = #objref
.br
Name = [NameComponent]
.br
Object = #objref
.br
Return = ok
.br
.RE
.RS
.LP
Creates a binding of a name and an object in the naming context even if the name is already bound\&. Naming contexts that are bound using \fIrebind()\fR do not participate in name resolution\&.
.RE
.LP
.B
bind_context(NamingContext1, Name, NamingContex2) -> Return
.br
.RS
.TP
Types
NamingContext1 = NamingContext2 =#objref
.br
Name = [NameComponent]
.br
Return = ok
.br
.RE
.RS
.LP
The bind_context function creates a binding of a name and a naming context in the current context\&. Naming contexts that are bound using \fIbind_context()\fR participate in name resolution\&.
.RE
.LP
.B
rebind_context(NamingContext1, Name, NamingContex2) -> Return
.br
.RS
.TP
Types
NamingContext1 = NamingContext2 =#objref
.br
Name = [NameComponent]
.br
Return = ok
.br
.RE
.RS
.LP
The rebind_context function creates a binding of a name and a naming context in the current context even if the name already is bound\&. Naming contexts that are bound using \fIrebind_context()\fR participate in name resolution\&.
.RE
.LP
.B
resolve(NamingContext, Name) -> Return
.br
.RS
.TP
Types
NamingContext = #objref
.br
Name = [NameComponent]
.br
Return = Object
.br
Object = #objref
.br
.RE
.RS
.LP
The resolve function is the way to retrieve an object bound to a name in the naming context\&. The given name must match exactly the bound name\&. The type of the object is not returned, clients are responsible for narrowing the object to the correct type\&.
.RE
.LP
.B
unbind(NamingContext, Name) -> Return
.br
.RS
.TP
Types
NamingContext = #objref
.br
Name = [NameComponent]
.br
Return = ok
.br
.RE
.RS
.LP
The unbind operation removes a name binding from the naming context\&.
.RE
.LP
.B
new_context(NamingContext) -> Return
.br
.RS
.TP
Types
NamingContext = #objref
.br
Return = #objref
.br
.RE
.RS
.LP
The new_context operation creates a new naming context\&.
.RE
.LP
.B
bind_new_context(NamingContext, Name) -> Return
.br
.RS
.TP
Types
NamingContext = #objref
.br
Name = [NameComponent]
.br
Return = #objref
.br
.RE
.RS
.LP
The new_context operation creates a new naming context and binds it to Name in the current context\&.
.RE
.LP
.B
destroy(NamingContext) -> Return
.br
.RS
.TP
Types
NamingContext = #objref
.br
Return = ok
.br
.RE
.RS
.LP
The destroy operation disposes the NamingContext object and removes it from the name server\&. The context must be empty e\&.g\&. not contain any bindings to be removed\&.
.RE
.LP
.B
list(NamingContext, HowMany) -> Return
.br
.RS
.TP
Types
NamingContext = #objref
.br
HowMany = int()
.br
Return = {ok, BindingList, BindingIterator}
.br
BindingList = [Binding]
.br
BindingIterator = #objref
.br
.RE
.RS
.LP
The list operation returns a BindingList with a number of bindings up-to HowMany from the context\&. It also returns a BindinIterator which can be used to step through the list\&. If the total number of existing bindings are less than, or equal to, the \fIHowMany\fR parameter a NIL object reference is returned\&.
.LP
.SS Note:
.LP
One must destroy the BindingIterator, unless it is a NIL object reference, by using \&'BindingIterator\&':destroy()\&. Otherwise one can get dangling objects\&.
.RE
|