|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.omg.PortableServer.Servant org.omg.CosNaming.NamingContextExtPOA org.apache.tuscany.sca.host.corba.naming.NamingContextBase
public abstract class NamingContextBase
Field Summary | |
---|---|
protected static java.util.logging.Logger |
logger
|
protected java.lang.String |
nonEscaped
|
protected org.omg.CORBA.ORB |
orb
|
protected org.omg.PortableServer.POA |
poa
|
Constructor Summary | |
---|---|
NamingContextBase(org.omg.CORBA.ORB orb,
org.omg.PortableServer.POA poa)
Create a new base NamingContext (super class constructor for the derived classes). |
Method Summary | |
---|---|
void |
bind_context(org.omg.CosNaming.NameComponent[] n,
org.omg.CosNaming.NamingContext nc)
Bind a new context to a given name. |
org.omg.CosNaming.NamingContext |
bind_new_context(org.omg.CosNaming.NameComponent[] n)
Create a new context and bind it in at the target location. |
void |
bind(org.omg.CosNaming.NameComponent[] n,
org.omg.CORBA.Object obj)
Bind an object to a given name. |
protected abstract void |
bindObject(org.omg.CosNaming.NameComponent n,
org.omg.CORBA.Object obj,
org.omg.CosNaming.BindingTypeHolder type)
Bind an object into the current context. |
protected void |
debug(java.lang.String message)
Log a line of debug output |
abstract void |
destroy()
Destroy a context. |
protected java.lang.String |
encodeRFC2396Name(java.lang.String name)
Perform RFC 2396 escape encoding of a name value. |
protected void |
escapeName(java.lang.String name,
java.lang.StringBuffer out)
Process a name or kind element of a NameComponent, adding escape characters for '.' or '/' characters that might appear in the name. |
protected org.omg.CosNaming.NameComponent[] |
extractSubName(org.omg.CosNaming.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,
org.omg.CosNaming.BindingListHolder bl,
org.omg.CosNaming.BindingIteratorHolder bi)
Create a list of bound objects an contexts contained within this context. |
protected void |
logNameComponent(java.lang.String message,
org.omg.CosNaming.NameComponent[] n)
Log the name components passed in for a request. |
protected void |
nameToString(org.omg.CosNaming.NameComponent name,
java.lang.StringBuffer out)
Convert a NameComponent item into a string form, appending it to a StringBuffer. |
abstract org.omg.CosNaming.NamingContext |
new_context()
Create a new context of the same type as the calling context. |
void |
rebind_context(org.omg.CosNaming.NameComponent[] n,
org.omg.CosNaming.NamingContext nc)
Rebind a context to a given name. |
void |
rebind(org.omg.CosNaming.NameComponent[] n,
org.omg.CORBA.Object obj)
Rebind an object to a given name. |
org.omg.CORBA.Object |
resolve_str(java.lang.String n)
Resolve a bound object or context using a name in String form. |
org.omg.CORBA.Object |
resolve(org.omg.CosNaming.NameComponent[] n)
Resolve an an entry in the context tree. |
protected org.omg.CosNaming.NamingContext |
resolveContext(org.omg.CosNaming.NameComponent name)
Resolve a name to a context object stored that has already been stored in this context. |
protected abstract org.omg.CORBA.Object |
resolveObject(org.omg.CosNaming.NameComponent n,
org.omg.CosNaming.BindingTypeHolder type)
Resolve an object in this context (single level resolution). |
org.omg.CosNaming.NameComponent[] |
to_name(java.lang.String sn)
Perform the reverse operation of the to_string() method, parsing a String context name into an array of NameComponents. |
java.lang.String |
to_string(org.omg.CosNaming.NameComponent[] n)
Convert an array of NameComponents into the string form of a context name. |
java.lang.String |
to_url(java.lang.String addr,
java.lang.String sn)
Create a URL name for accessing a component by name. |
void |
unbind(org.omg.CosNaming.NameComponent[] n)
Remove an entry from the context tree. |
protected abstract org.omg.CORBA.Object |
unbindObject(org.omg.CosNaming.NameComponent n)
Unbind an object from the current context. |
protected void |
validateName(org.omg.CosNaming.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, _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 java.util.logging.Logger logger
protected final java.lang.String nonEscaped
protected org.omg.CORBA.ORB orb
protected org.omg.PortableServer.POA poa
Constructor Detail |
---|
public NamingContextBase(org.omg.CORBA.ORB orb, org.omg.PortableServer.POA poa) throws java.lang.Exception
orb
- The ORB this is hosted on.
java.lang.Exception
Method Detail |
---|
public void bind(org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.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.
org.omg.CosNaming.NamingContextPackage.NotFound
org.omg.CosNaming.NamingContextPackage.CannotProceed
org.omg.CosNaming.NamingContextPackage.InvalidName
org.omg.CosNaming.NamingContextPackage.AlreadyBound
public void rebind(org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.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.
org.omg.CosNaming.NamingContextPackage.NotFound
org.omg.CosNaming.NamingContextPackage.CannotProceed
org.omg.CosNaming.NamingContextPackage.InvalidName
org.omg.CosNaming.NamingContextPackage.AlreadyBound
public void bind_context(org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.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.
org.omg.CosNaming.NamingContextPackage.NotFound
org.omg.CosNaming.NamingContextPackage.CannotProceed
org.omg.CosNaming.NamingContextPackage.InvalidName
org.omg.CosNaming.NamingContextPackage.AlreadyBound
public void rebind_context(org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.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.
org.omg.CosNaming.NamingContextPackage.NotFound
org.omg.CosNaming.NamingContextPackage.CannotProceed
org.omg.CosNaming.NamingContextPackage.InvalidName
org.omg.CosNaming.NamingContextPackage.AlreadyBound
public org.omg.CORBA.Object resolve(org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.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.
org.omg.CosNaming.NamingContextPackage.NotFound
org.omg.CosNaming.NamingContextPackage.CannotProceed
org.omg.CosNaming.NamingContextPackage.InvalidName
org.omg.CosNaming.NamingContextPackage.AlreadyBound
public void unbind(org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.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.
org.omg.CosNaming.NamingContextPackage.NotFound
org.omg.CosNaming.NamingContextPackage.CannotProceed
org.omg.CosNaming.NamingContextPackage.InvalidName
org.omg.CosNaming.NamingContextPackage.AlreadyBound
public org.omg.CosNaming.NamingContext bind_new_context(org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.AlreadyBound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.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.
org.omg.CosNaming.NamingContextPackage.NotFound
org.omg.CosNaming.NamingContextPackage.CannotProceed
org.omg.CosNaming.NamingContextPackage.InvalidName
org.omg.CosNaming.NamingContextPackage.AlreadyBound
public java.lang.String to_string(org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.InvalidName
n
- The array of NameComponents to convert.
org.omg.CosNaming.NamingContextPackage.InvalidName
public org.omg.CosNaming.NameComponent[] to_name(java.lang.String sn) throws org.omg.CosNaming.NamingContextPackage.InvalidName
sn
- The string form of the name.
org.omg.CosNaming.NamingContextPackage.InvalidName
public java.lang.String to_url(java.lang.String addr, java.lang.String sn) throws org.omg.CosNaming.NamingContextExtPackage.InvalidAddress, org.omg.CosNaming.NamingContextPackage.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.
org.omg.CosNaming.NamingContextExtPackage.InvalidAddress
org.omg.CosNaming.NamingContextPackage.InvalidName
public org.omg.CORBA.Object resolve_str(java.lang.String n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
n
- The string name of the object context. This must
be a form parseable by to_name().
org.omg.CosNaming.NamingContextPackage.NotFound
org.omg.CosNaming.NamingContextPackage.CannotProceed
org.omg.CosNaming.NamingContextPackage.InvalidName
public abstract org.omg.CosNaming.NamingContext new_context() throws org.omg.CORBA.SystemException
org.omg.CosNaming.NamingContextPackage.NotFound
org.omg.CORBA.SystemException
public abstract void destroy() throws org.omg.CosNaming.NamingContextPackage.NotEmpty
org.omg.CosNaming.NamingContextPackage.NotEmpty
public abstract void list(int how_many, org.omg.CosNaming.BindingListHolder bl, org.omg.CosNaming.BindingIteratorHolder bi) throws org.omg.CORBA.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.
org.omg.CORBA.SystemException
protected abstract org.omg.CORBA.Object resolveObject(org.omg.CosNaming.NameComponent n, org.omg.CosNaming.BindingTypeHolder type) throws org.omg.CORBA.SystemException
n
- The name of the target object.type
- A type holder for returning the bound object type
information.
org.omg.CORBA.SystemException
protected abstract void bindObject(org.omg.CosNaming.NameComponent n, org.omg.CORBA.Object obj, org.omg.CosNaming.BindingTypeHolder type) throws org.omg.CORBA.SystemException
n
- The single-level name of the target object.obj
- The object or context to be bound.type
-
org.omg.CORBA.SystemException
protected abstract org.omg.CORBA.Object unbindObject(org.omg.CosNaming.NameComponent n) throws org.omg.CORBA.SystemException
n
- The name of the target object (single level).
org.omg.CORBA.SystemException
protected org.omg.CosNaming.NamingContext resolveContext(org.omg.CosNaming.NameComponent name) throws org.omg.CosNaming.NamingContextPackage.NotFound
name
- The target name.
org.omg.CosNaming.NamingContextPackage.NotFound
protected org.omg.CosNaming.NameComponent[] extractSubName(org.omg.CosNaming.NameComponent[] name)
name
- The current name array (this MUST have 2 or more
elements).
protected void validateName(org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.InvalidName
n
- The NameComponent array to check.
org.omg.CosNaming.NamingContextPackage.InvalidName
protected void nameToString(org.omg.CosNaming.NameComponent name, java.lang.StringBuffer out)
name
- The source NameComponent.out
- The StringBuffer location used to store the name
value (appended to the end).protected void escapeName(java.lang.String name, java.lang.StringBuffer out)
name
- The name element to process.out
- The StringBuffer to copy the escaped name into.protected java.lang.String encodeRFC2396Name(java.lang.String name)
name
- The input name value.
protected boolean isDebugEnabled()
protected void debug(java.lang.String message)
message
- The message to logprotected void logNameComponent(java.lang.String message, org.omg.CosNaming.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 |