|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.omg.PortableServer.Servant
org.omg.CosNaming.NamingContextExtPOA
org.apache.yoko.orb.CosNaming.NamingContextBase
public abstract class NamingContextBase
Field Summary | |
---|---|
protected static Logger |
logger
|
protected String |
nonEscaped
|
protected ORB |
orb
|
protected POA |
poa
|
Constructor Summary | |
---|---|
NamingContextBase(ORB orb,
POA poa)
Create a new base NamingContext (super class constructor for the derived classes). |
Method Summary | |
---|---|
void |
bind_context(NameComponent[] n,
NamingContext nc)
Bind a new context to a given name. |
NamingContext |
bind_new_context(NameComponent[] n)
Create a new context and bind it in at the target location. |
void |
bind(NameComponent[] n,
Object obj)
Bind an object to a given name. |
protected abstract void |
bindObject(NameComponent n,
Object obj,
BindingTypeHolder type)
Bind an object into the current context. |
protected void |
debug(String message)
Log a line of debug output |
abstract void |
destroy()
Destroy a context. |
protected String |
encodeRFC2396Name(String name)
Perform RFC 2396 escape encoding of a name value. |
protected void |
escapeName(String name,
StringBuffer out)
Process a name or kind element of a NameComponent, adding escape characters for '.' or '/' characters that might appear in the name. |
protected NameComponent[] |
extractSubName(NameComponent[] name)
Extract the tail portion of a name. |
protected boolean |
isDebugEnabled()
Test if debug logging is currently available. |
abstract void |
list(int how_many,
BindingListHolder bl,
BindingIteratorHolder bi)
Create a list of bound objects an contexts contained within this context. |
protected void |
logNameComponent(String message,
NameComponent[] n)
Log the name components passed in for a request. |
protected void |
nameToString(NameComponent name,
StringBuffer out)
Convert a NameComponent item into a string form, appending it to a StringBuffer. |
abstract NamingContext |
new_context()
Create a new context of the same type as the calling context. |
void |
rebind_context(NameComponent[] n,
NamingContext nc)
Rebind a context to a given name. |
void |
rebind(NameComponent[] n,
Object obj)
Rebind an object to a given name. |
Object |
resolve_str(String n)
Resolve a bound object or context using a name in String form. |
Object |
resolve(NameComponent[] n)
Resolve an an entry in the context tree. |
protected NamingContext |
resolveContext(NameComponent name)
Resolve a name to a context object stored that has already been stored in this context. |
protected abstract Object |
resolveObject(NameComponent n,
BindingTypeHolder type)
Resolve an object in this context (single level resolution). |
NameComponent[] |
to_name(String sn)
Perform the reverse operation of the to_string() method, parsing a String context name into an array of NameComponents. |
String |
to_string(NameComponent[] n)
Convert an array of NameComponents into the string form of a context name. |
String |
to_url(String addr,
String sn)
Create a URL name for accessing a component by name. |
void |
unbind(NameComponent[] n)
Remove an entry from the context tree. |
protected abstract Object |
unbindObject(NameComponent n)
Unbind an object from the current context. |
protected void |
validateName(NameComponent[] n)
Perform common name validity checking. |
Methods inherited from class org.omg.CosNaming.NamingContextExtPOA |
---|
_all_interfaces, _invoke, _this, _this |
Methods inherited from class org.omg.PortableServer.Servant |
---|
_default_POA, _get_delegate, _get_interface_def, _get_interface, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger logger
protected final String nonEscaped
protected ORB orb
protected POA poa
Constructor Detail |
---|
public NamingContextBase(ORB orb, POA poa) throws Exception
orb
- The ORB this is hosted on.
Exception
Method Detail |
---|
public void bind(NameComponent[] n, Object obj) throws NotFound, CannotProceed, InvalidName, AlreadyBound
n
- An array of NameComponents that are the target name.
The last element in the array is binding name for the
object. The remainder of the array is the path
for resolving the naming context, relative to the
current context. All path contexts must already be
bound in the context tree.obj
- The object to be bound.
NotFound
CannotProceed
InvalidName
AlreadyBound
public void rebind(NameComponent[] n, Object obj) throws NotFound, CannotProceed, InvalidName
n
- An array of NameComponents that are the target name.
The last element in the array is binding name for the
object. The remainder of the array is the path
for resolving the naming context, relative to the
current context. All path contexts must already be
bound in the context tree.obj
- The new value for this binding.
NotFound
CannotProceed
InvalidName
AlreadyBound
public void bind_context(NameComponent[] n, NamingContext nc) throws NotFound, CannotProceed, InvalidName, AlreadyBound
n
- An array of NameComponents that are the target name.
The last element in the array is binding name for the
object. The remainder of the array is the path
for resolving the naming context, relative to the
current context. All path contexts must already be
bound in the context tree.nc
- The new naming context added to the tree.
NotFound
CannotProceed
InvalidName
AlreadyBound
public void rebind_context(NameComponent[] n, NamingContext nc) throws NotFound, CannotProceed, InvalidName
n
- An array of NameComponents that are the target name.
The last element in the array is binding name for the
object. The remainder of the array is the path
for resolving the naming context, relative to the
current context. All path contexts must already be
bound in the context tree.nc
- The new context to be bound with the name.
NotFound
CannotProceed
InvalidName
AlreadyBound
public Object resolve(NameComponent[] n) throws NotFound, CannotProceed, InvalidName
n
- An array of NameComponents that are the target name.
The last element in the array is binding name for the
object. The remainder of the array is the path
for resolving the naming context, relative to the
current context. All path contexts must already be
bound in the context tree.
NotFound
CannotProceed
InvalidName
AlreadyBound
public void unbind(NameComponent[] n) throws NotFound, CannotProceed, InvalidName
n
- An array of NameComponents that are the target name.
The last element in the array is binding name for the
object. The remainder of the array is the path
for resolving the naming context, relative to the
current context. All path contexts must already be
bound in the context tree.
NotFound
CannotProceed
InvalidName
AlreadyBound
public NamingContext bind_new_context(NameComponent[] n) throws NotFound, AlreadyBound, CannotProceed, InvalidName
n
- An array of NameComponents that are the target name.
The last element in the array is binding name for the
object. The remainder of the array is the path
for resolving the naming context, relative to the
current context. All path contexts must already be
bound in the context tree.
NotFound
CannotProceed
InvalidName
AlreadyBound
public String to_string(NameComponent[] n) throws InvalidName
n
- The array of NameComponents to convert.
InvalidName
public NameComponent[] to_name(String sn) throws InvalidName
sn
- The string form of the name.
InvalidName
public String to_url(String addr, String sn) throws InvalidAddress, InvalidName
addr
- The address location for the naming service used
to resolve the object. This is in "host:port" form,
just line a corbaloc: URL.sn
- The string mae of the target object.
InvalidAddress
InvalidName
public Object resolve_str(String n) throws NotFound, CannotProceed, InvalidName
n
- The string name of the object context. This must
be a form parseable by to_name().
NotFound
CannotProceed
InvalidName
public abstract NamingContext new_context() throws SystemException
NotFound
SystemException
public abstract void destroy() throws NotEmpty
NotEmpty
public abstract void list(int how_many, BindingListHolder bl, BindingIteratorHolder bi) throws SystemException
how_many
- The count of elements to return as a BindingList.bl
- A holder element for returning the source binding list.bi
- A holder for returning a BindingIterator. Any extra
elements not returned in the BindingList are returned
in the BindingIterator.
SystemException
protected abstract Object resolveObject(NameComponent n, BindingTypeHolder type) throws SystemException
n
- The name of the target object.type
- A type holder for returning the bound object type
information.
SystemException
protected abstract void bindObject(NameComponent n, Object obj, BindingTypeHolder type) throws SystemException
n
- The single-level name of the target object.obj
- The object or context to be bound.type
-
SystemException
protected abstract Object unbindObject(NameComponent n) throws SystemException
n
- The name of the target object (single level).
SystemException
protected NamingContext resolveContext(NameComponent name) throws NotFound
name
- The target name.
NotFound
protected NameComponent[] extractSubName(NameComponent[] name)
name
- The current name array (this MUST have 2 or more
elements).
protected void validateName(NameComponent[] n) throws InvalidName
n
- The NameComponent array to check.
InvalidName
protected void nameToString(NameComponent name, StringBuffer out)
name
- The source NameComponent.out
- The StringBuffer location used to store the name
value (appended to the end).protected void escapeName(String name, StringBuffer out)
name
- The name element to process.out
- The StringBuffer to copy the escaped name into.protected String encodeRFC2396Name(String name)
name
- The input name value.
protected boolean isDebugEnabled()
protected void debug(String message)
message
- The message to logprotected void logNameComponent(String message, NameComponent[] n)
message
- A message describing the request context.n
- The array of name components.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |