public abstract class NamingContextImpl extends NamingContextExtPOA implements NamingContextDataStore
The operations bind(), rebind(), bind_context() and rebind_context() are all really implemented by doBind(). resolve() is really implemented by doResolve(), unbind() by doUnbind(). list(), new_context() and destroy() uses the NamingContextDataStore interface directly. All the doX() methods are public static. They synchronize on the NamingContextDataStore object.
An implementation a NamingContext must extend this class and implement the NamingContextDataStore interface with the operations: Bind(), Resolve(), Unbind(), List(), NewContext() and Destroy(). Calls to these methods are synchronized; these methods should therefore not be synchronized.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
debug |
protected POA |
nsPOA |
protected ORB |
orb |
| Constructor and Description |
|---|
NamingContextImpl(ORB orb,
POA poa)
Create a naming context servant.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind_context(NameComponent[] n,
NamingContext nc)
Bind a NamingContext under a name in this NamingContext.
|
NamingContext |
bind_new_context(NameComponent[] n)
Create a new NamingContext, bind it in this Naming Context and return
its object reference.
|
void |
bind(NameComponent[] n,
Object obj)
Bind an object under a name in this NamingContext.
|
void |
destroy()
Destroy this NamingContext object.
|
static void |
doBind(NamingContextDataStore impl,
NameComponent[] n,
Object obj,
boolean rebind,
BindingType bt)
Implements all four flavors of binding.
|
static Object |
doResolve(NamingContextDataStore impl,
NameComponent[] n)
Implements resolving names in this NamingContext.
|
static void |
doUnbind(NamingContextDataStore impl,
NameComponent[] n)
Implements unbinding bound names in this NamingContext.
|
POA |
getNSPOA() |
void |
list(int how_many,
BindingListHolder bl,
BindingIteratorHolder bi)
List the contents of this NamingContest.
|
static String |
nameToString(NameComponent[] name) |
NamingContext |
new_context()
Create a NamingContext object and return its object reference.
|
void |
rebind_context(NameComponent[] n,
NamingContext nc)
Bind a NamingContext under a name in this NamingContext.
|
void |
rebind(NameComponent[] n,
Object obj)
Bind an object under a name in this NamingContext.
|
Object |
resolve_str(String sn)
This operation resolves the Stringified name into the object
reference.
|
Object |
resolve(NameComponent[] n)
Resolve a name in this NamingContext and return the object reference
bound to the name.
|
protected static NamingContext |
resolveFirstAsContext(NamingContextDataStore impl,
NameComponent[] n)
Implements resolving a NameComponent in this context and
narrowing it to CosNaming::NamingContext.
|
NameComponent[] |
to_name(String sn)
This operation converts a Stringified Name into an equivalent array
of Name Components.
|
String |
to_string(NameComponent[] n)
This operation creates a stringified name from the array of Name
components.
|
String |
to_url(String addr,
String sn)
This operation creates a URL based "iiopname://" format name
from the Stringified Name of the object.
|
void |
unbind(NameComponent[] n)
Remove a binding from this NamingContext.
|
_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, waitBind, Destroy, IsEmpty, List, NewContext, Resolve, Unbindprotected POA nsPOA
protected transient ORB orb
public static final boolean debug
public POA getNSPOA()
getNSPOA in interface NamingContextDataStorepublic void bind(NameComponent[] n, Object obj) throws NotFound, CannotProceed, InvalidName, AlreadyBound
bind in interface NamingContextOperationsn - a sequence of NameComponents which is the name under which
the object will be bound.obj - the object reference to be bound.NotFound - A name with
multiple components was supplied, but the first component could not be
resolved.CannotProceed - Could
not proceed in resolving the n-1 components of the supplied name.InvalidName - The
supplied name is invalid (i.e., has length less than 1).AlreadyBound - An object
is already bound under the supplied name.SystemException - One of a fixed set of CORBA
system exceptions.doBindpublic void bind_context(NameComponent[] n, NamingContext nc) throws NotFound, CannotProceed, InvalidName, AlreadyBound
bind_context in interface NamingContextOperationsn - a sequence of NameComponents which is the name under which
the object will be bound.obj - the NamingContect object reference to be bound.NotFound - A name with
multiple components was supplied, but the first component could not be
resolved.CannotProceed - Could
not proceed in resolving the n-1 components of the supplied name.InvalidName - The
supplied name is invalid (i.e., has length less than 1).AlreadyBound - An object
is already bound under the supplied name.SystemException - One of a fixed set of CORBA
system exceptions.doBindpublic void rebind(NameComponent[] n, Object obj) throws NotFound, CannotProceed, InvalidName
rebind in interface NamingContextOperationsn - a sequence of NameComponents which is the name under which
the object will be bound.obj - the object reference to be bound.NotFound - A name with
multiple components was supplied, but the first component could not be
resolved.CannotProceed - Could not
proceed in resolving the n-1 components of the supplied name.InvalidName - The
supplied name is invalid (i.e., has length less than 1).SystemException - One of a fixed set of CORBA
system exceptions.doBindpublic void rebind_context(NameComponent[] n, NamingContext nc) throws NotFound, CannotProceed, InvalidName
rebind_context in interface NamingContextOperationsn - a sequence of NameComponents which is the name under which
the object will be bound.obj - the object reference to be bound.NotFound - A name with
multiple components was supplied, but the first component could not be
resolved.CannotProceed - Could not
proceed in resolving the n-1 components of the supplied name.InvalidName - The
supplied name is invalid (i.e., has length less than 1).SystemException - One of a fixed set of CORBA
system exceptions.doBindpublic Object resolve(NameComponent[] n) throws NotFound, CannotProceed, InvalidName
resolve in interface NamingContextOperationsn - a sequence of NameComponents which is the name to be resolved.NotFound - A name with
multiple components was supplied, but the first component could not be
resolved.CannotProceed - Could not
proceed in resolving the n-1 components of the supplied name.InvalidName - The
supplied name is invalid (i.e., has length less than 1).SystemException - One of a fixed set of CORBA
system exceptions.doResolvepublic void unbind(NameComponent[] n) throws NotFound, CannotProceed, InvalidName
unbind in interface NamingContextOperationsn - a sequence of NameComponents which is the name to be unbound.NotFound - A name with
multiple components was supplied, but the first component could not be
resolved.CannotProceed - Could not
proceed in resolving the n-1 components of the supplied name.InvalidName - The
supplied name is invalid (i.e., has length less than 1).SystemException - One of a fixed set of CORBA
system exceptions.doUnbindpublic void list(int how_many,
BindingListHolder bl,
BindingIteratorHolder bi)
list in interface NamingContextOperationshow_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.BindingListHolder,
BindingIteratorImplpublic NamingContext new_context()
new_context in interface NamingContextOperationsSystemException - One of a fixed set of CORBA
system exceptions.public NamingContext bind_new_context(NameComponent[] n) throws NotFound, AlreadyBound, CannotProceed, InvalidName
bind_new_context in interface NamingContextOperationsn - a sequence of NameComponents which is the name to be unbound.AlreadyBound - An object
is already bound under the supplied name.NotFound - A name with
multiple components was supplied, but the first component could not be
resolved.CannotProceed - Could not
proceed in resolving the n-1 components of the supplied name.InvalidName - The
supplied name is invalid (i.e., has length less than 1).SystemException - One of a fixed set of CORBA
system exceptions.new_context,
bind_contextpublic void destroy()
throws NotEmpty
destroy in interface NamingContextOperationsNotEmpty - This
NamingContext is not empty (i.e., contains bindings).SystemException - One of a fixed set of CORBA
system exceptions.public static void doBind(NamingContextDataStore impl, NameComponent[] n, Object obj, boolean rebind, BindingType bt) throws NotFound, CannotProceed, InvalidName, AlreadyBound
impl - an implementation of NamingContextDataStoren - a sequence of NameComponents which is the name under which
the object will be bound.obj - the object reference to be bound.rebind - Replace an existing binding or not.bt - Type of binding (as object or as context).NotFound - A name with
multiple components was supplied, but the first component could not be
resolved.CannotProceed - Could not * proceed
in resolving the first component of the supplied name.InvalidName - The
supplied name is invalid (i.e., has length less than 1).AlreadyBound - An object
is already bound under the supplied name.SystemException - One of a fixed set of CORBA
system exceptions.resolve,
unbind,
bind,
bind_context,
rebind,
rebind_contextpublic static Object doResolve(NamingContextDataStore impl, NameComponent[] n) throws NotFound, CannotProceed, InvalidName
impl - an implementation of NamingContextDataStoren - a sequence of NameComponents which is the name to be resolved.NotFound - A name with
multiple components was supplied, but the first component could not be
resolved.CannotProceed - Could not
proceed
in resolving the first component of the supplied name.InvalidName - The supplied
name is invalid (i.e., has length less than 1).SystemException - One of a fixed set of CORBA system
exceptions.resolvepublic static void doUnbind(NamingContextDataStore impl, NameComponent[] n) throws NotFound, CannotProceed, InvalidName
impl - an implementation of NamingContextDataStoren - a sequence of NameComponents which is the name to be unbound.NotFound - A name with multiple
components was supplied, but the first component could not be
resolved.CannotProceed - Could not proceed
in resolving the n-1 components of the supplied name.InvalidName - The supplied name
is invalid (i.e., has length less than 1).SystemException - One of a fixed set of CORBA system exceptions.resolveprotected static NamingContext resolveFirstAsContext(NamingContextDataStore impl, NameComponent[] n) throws NotFound
impl - an implementation of NamingContextDataStoren - a NameComponents which is the name to be found.NotFound - The
first component could not be resolved.CannotProceed - Could not proceed
in resolving the first component of the supplied name.SystemException - One of a fixed set of CORBA system exceptions.resolvepublic String to_string(NameComponent[] n) throws InvalidName
to_string in interface NamingContextExtOperationsn - Name of the object org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.InvalidNamepublic NameComponent[] to_name(String sn) throws InvalidName
to_name in interface NamingContextExtOperationssn - Stringified Name of the object org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.InvalidNamepublic String to_url(String addr, String sn) throws InvalidAddress, InvalidName
to_url in interface NamingContextExtOperationsaddr - internet based address of the host machine where
Name Service is running sn - Stringified Name of the object org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.org.omg.CosNaming.NamingContextPackage.InvalidAddress - Indicates the internet based address of the host machine is
incorrect InvalidAddressInvalidNamepublic Object resolve_str(String sn) throws NotFound, CannotProceed, InvalidName
resolve_str in interface NamingContextExtOperationssn - Stringified Name of the object NotFound - Indicates there is no object reference for the given name. CannotProceed - Indicates that the given compound name is incorrect org.omg.CosNaming.NamingContextExtPackage.InvalidName - Indicates the name does not identify a binding.AlreadyBound - Indicates the name is already bound.InvalidNamepublic static String nameToString(NameComponent[] name)
Copyright © 2018 JBoss by Red Hat. All rights reserved.