public class TransientNamingContext extends NamingContextImpl implements NamingContextDataStore
The keys in the hash table are InternalBindingKey objects, containing a single NameComponent and implementing the proper functions, i.e., equals() and hashCode() in an efficient manner. The values in the hash table are InternalBindingValues and store a org.omg.CosNaming::Binding and the object reference associated with the binding. For iteration, TransientBindingIterator objects are created, which are passed a cloned copy of the hashtable. Since elements are inserted and deleted and never modified, this provides stable iterators at the cost of cloning the hash table.
To create and destroy object references, the TransientNamingContext uses the orb.connect() and orb.disconnect() methods.
Modifier and Type | Field and Description |
---|---|
Object |
localRoot
The local root naming context.
|
debug, nsPOA, orb
Constructor and Description |
---|
TransientNamingContext(ORB orb,
Object initial,
POA nsPOA)
Constructs a new TransientNamingContext object.
|
Modifier and Type | Method and Description |
---|---|
void |
Bind(NameComponent n,
Object obj,
BindingType bt)
Binds the object to the name component as the specified binding type.
|
void |
Destroy()
Destroys this NamingContext by disconnecting from the ORB.
|
boolean |
IsEmpty()
Return whether this NamingContext contains any bindings.
|
void |
List(int how_many,
BindingListHolder bl,
BindingIteratorHolder bi)
List the contents of this NamingContext.
|
NamingContext |
NewContext()
Create a new NamingContext.
|
Object |
Resolve(NameComponent n,
BindingTypeHolder bth)
Resolves the supplied name to an object reference and returns
the type of the resolved binding.
|
Object |
Unbind(NameComponent n)
Deletes the binding with the supplied name.
|
bind_context, bind_new_context, bind, destroy, doBind, doResolve, doUnbind, getNSPOA, list, nameToString, new_context, rebind_context, rebind, resolve_str, resolve, resolveFirstAsContext, to_name, to_string, to_url, unbind
_all_interfaces, _invoke, _this, _this
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNSPOA
public Object localRoot
public TransientNamingContext(ORB orb, Object initial, POA nsPOA) throws Exception
orb
- an orb object.initial
- the initial naming context.Exception
- a Java exception thrown of the base class cannot
initialize.public final void Bind(NameComponent n, Object obj, BindingType bt) throws SystemException
Bind
in interface NamingContextDataStore
n
- A single org.omg.CosNaming::NameComponent under which the
object will be bound.obj
- An object reference to be bound under the supplied name.bt
- The type of the binding (i.e., as object or as context).SystemException
- One of a fixed set of CORBA
system exceptions.public final Object Resolve(NameComponent n, BindingTypeHolder bth) throws SystemException
Resolve
in interface NamingContextDataStore
n
- a NameComponent which is the name to be resolved.bth
- the BindingType as an out parameter.SystemException
- One of a fixed set of CORBA
system exceptions.public final Object Unbind(NameComponent n) throws SystemException
Unbind
in interface NamingContextDataStore
n
- a NameComponent which is the name to unbindSystemException
- One of a fixed set of CORBA
system exceptions.public final void List(int how_many, BindingListHolder bl, BindingIteratorHolder bi) throws SystemException
List
in interface NamingContextDataStore
how_many
- The number of requested bindings in the BindingList.bl
- The BindingList as an out parameter.bi
- The BindingIterator as an out parameter.SystemException
- One of a fixed set of CORBA
system exceptions.public final NamingContext NewContext() throws SystemException
NewContext
in interface NamingContextDataStore
SystemException
- One of a fixed set of CORBA
system exceptions.public final void Destroy() throws SystemException
Destroy
in interface NamingContextDataStore
SystemException
- One of a fixed set of CORBA
system exceptions.public final boolean IsEmpty()
IsEmpty
in interface NamingContextDataStore
Copyright © 2017 JBoss by Red Hat. All rights reserved.