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_object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Bind, Destroy, IsEmpty, List, NewContext, Resolve, Unbind
protected POA nsPOA
protected transient ORB orb
public static final boolean debug
public POA getNSPOA()
getNSPOA
in interface NamingContextDataStore
public void bind(NameComponent[] n, Object obj) throws NotFound, CannotProceed, InvalidName, AlreadyBound
bind
in interface NamingContextOperations
n
- 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.doBind
public void bind_context(NameComponent[] n, NamingContext nc) throws NotFound, CannotProceed, InvalidName, AlreadyBound
bind_context
in interface NamingContextOperations
n
- 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.doBind
public void rebind(NameComponent[] n, Object obj) throws NotFound, CannotProceed, InvalidName
rebind
in interface NamingContextOperations
n
- 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.doBind
public void rebind_context(NameComponent[] n, NamingContext nc) throws NotFound, CannotProceed, InvalidName
rebind_context
in interface NamingContextOperations
n
- 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.doBind
public Object resolve(NameComponent[] n) throws NotFound, CannotProceed, InvalidName
resolve
in interface NamingContextOperations
n
- 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.doResolve
public void unbind(NameComponent[] n) throws NotFound, CannotProceed, InvalidName
unbind
in interface NamingContextOperations
n
- 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.doUnbind
public void list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
list
in interface NamingContextOperations
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.BindingListHolder
,
BindingIteratorImpl
public NamingContext new_context()
new_context
in interface NamingContextOperations
SystemException
- 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 NamingContextOperations
n
- 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_context
public void destroy() throws NotEmpty
destroy
in interface NamingContextOperations
NotEmpty
- 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_context
public 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.resolve
public 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.resolve
protected 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.resolve
public String to_string(NameComponent[] n) throws InvalidName
to_string
in interface NamingContextExtOperations
n
- Name of the object org.omg.CosNaming.NamingContextExtPackage.InvalidName
- Indicates the name does not identify a binding.InvalidName
public NameComponent[] to_name(String sn) throws InvalidName
to_name
in interface NamingContextExtOperations
sn
- Stringified Name of the object org.omg.CosNaming.NamingContextExtPackage.InvalidName
- Indicates the name does not identify a binding.InvalidName
public String to_url(String addr, String sn) throws InvalidAddress, InvalidName
to_url
in interface NamingContextExtOperations
addr
- 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 InvalidAddress
InvalidName
public Object resolve_str(String sn) throws NotFound, CannotProceed, InvalidName
resolve_str
in interface NamingContextExtOperations
sn
- 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.InvalidName
public static String nameToString(NameComponent[] name)
Copyright © 2019 JBoss by Red Hat. All rights reserved.