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.
|
nsPOA, orb| Constructor and Description |
|---|
TransientNamingContext(ORB orb,
Object initial,
POA nsPOA)
Constructs a new TransientNamingContext object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bindImpl(NameComponent n,
Object obj,
BindingType bt)
Binds the object to the name component as the specified binding type.
|
void |
destroyImpl()
Destroys this NamingContext by disconnecting from the ORB.
|
boolean |
isEmptyImpl()
Return whether this NamingContext contains any bindings.
|
void |
listImpl(int how_many,
BindingListHolder bl,
BindingIteratorHolder bi)
List the contents of this NamingContext.
|
NamingContext |
newContextImpl()
Create a new NamingContext.
|
Object |
resolveImpl(NameComponent n,
BindingTypeHolder bth)
Resolves the supplied name to an object reference and returns
the type of the resolved binding.
|
Object |
unbindImpl(NameComponent n)
Deletes the binding with the supplied name.
|
bind_context, bind_new_context, bind, destroy, doBind, doResolve, doUnbind, getNSPOA, list, 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_objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNSPOApublic 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 bindImpl(NameComponent n, Object obj, BindingType bt) throws SystemException
bindImpl in interface NamingContextDataStoren - 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 resolveImpl(NameComponent n, BindingTypeHolder bth) throws SystemException
resolveImpl in interface NamingContextDataStoren - 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 unbindImpl(NameComponent n) throws SystemException
unbindImpl in interface NamingContextDataStoren - a NameComponent which is the name to unbindSystemException - One of a fixed set of CORBA
system exceptions.public final void listImpl(int how_many,
BindingListHolder bl,
BindingIteratorHolder bi)
throws SystemException
listImpl in interface NamingContextDataStorehow_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 newContextImpl() throws SystemException
newContextImpl in interface NamingContextDataStoreSystemException - One of a fixed set of CORBA
system exceptions.public final void destroyImpl()
throws SystemException
destroyImpl in interface NamingContextDataStoreSystemException - One of a fixed set of CORBA
system exceptions.public final boolean isEmptyImpl()
isEmptyImpl in interface NamingContextDataStoreCopyright © 2017–2019 Eclipse Foundation. All rights reserved.