Package com.sun.corba.ee.impl.corba
Class ContextImpl
- java.lang.Object
-
- org.omg.CORBA.Context
-
- com.sun.corba.ee.impl.corba.ContextImpl
-
public final class ContextImpl extends Context
-
-
Field Summary
Fields Modifier and Type Field Description private ORB
_orb
private static ORBUtilSystemException
wrapper
-
Constructor Summary
Constructors Constructor Description ContextImpl(Context parent)
ContextImpl(ORB orb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
context_name()
Retrieves the name of thisContext
object.Context
create_child(java.lang.String name)
Creates aContext
object with the given string as its name and with thisContext
object set as its parent.void
delete_values(java.lang.String propName)
Deletes from thisContext
object theNamedValue
object(s) whosename
field matches the given property name.NVList
get_values(java.lang.String startScope, int opFlags, java.lang.String propName)
Retrieves theNamedValue
objects whosename
field matches the given name or name pattern.Context
parent()
Retrieves the parent of thisContext
object.void
set_one_value(java.lang.String propName, Any propValue)
Creates aNamedValue
object and adds it to thisContext
object.void
set_values(NVList values)
I Sets one or more property values in thisContext
object.
-
-
-
Field Detail
-
wrapper
private static final ORBUtilSystemException wrapper
-
_orb
private ORB _orb
-
-
Method Detail
-
context_name
public java.lang.String context_name()
Description copied from class:Context
Retrieves the name of thisContext
object.- Specified by:
context_name
in classContext
- Returns:
- the name of this
Context
object
-
parent
public Context parent()
Description copied from class:Context
Retrieves the parent of thisContext
object.
-
create_child
public Context create_child(java.lang.String name)
Description copied from class:Context
Creates aContext
object with the given string as its name and with thisContext
object set as its parent.The new
Context
object is chained into its parentContext
object. This means that in a search for matching property names, if a match is not found in this context, the search will continue in the parent. If that is not successful, the search will continue in the grandparent, if there is one, and so on.- Specified by:
create_child
in classContext
- Parameters:
name
- theString
object to be set as the name of the newContext
object- Returns:
- the newly-created child
Context
object initialized with the specified name
-
set_one_value
public void set_one_value(java.lang.String propName, Any propValue)
Description copied from class:Context
Creates aNamedValue
object and adds it to thisContext
object. Thename
field of the newNamedValue
object is set to the given string, thevalue
field is set to the givenAny
object, and theflags
field is set to zero.- Specified by:
set_one_value
in classContext
- Parameters:
propName
- the name of the property to be setpropValue
- theAny
object to which the value of the property will be set. TheAny
object'svalue
field contains the value to be associated with the given propname; thekind
field must be set toTCKind.tk_string
.
-
set_values
public void set_values(NVList values)
Description copied from class:Context
I Sets one or more property values in thisContext
object. TheNVList
supplied to this method contains one or moreNamedValue
objects. In eachNamedValue
object, thename
field holds the name of the property, and theflags
field must be set to zero. TheNamedValue
object'svalue
field contains anAny
object, which, in turn, contains the value for the property. Since the value is always a string, theAny
object must have thekind
field of itsTypeCode
set toTCKind.tk_string
.- Specified by:
set_values
in classContext
- Parameters:
values
- an NVList containing the property names and associated values to be set- See Also:
Context.get_values(java.lang.String, int, java.lang.String)
,NamedValue
,Any
-
delete_values
public void delete_values(java.lang.String propName)
Description copied from class:Context
Deletes from thisContext
object theNamedValue
object(s) whosename
field matches the given property name. If theString
object supplied forpropname
has a trailing wildcard character ("*"), then allNamedValue
objects whosename
fields match will be deleted. The search scope is always limited to thisContext
object.If no matching property is found, an exception is returned.
- Specified by:
delete_values
in classContext
- Parameters:
propName
- name of the property to be deleted
-
get_values
public NVList get_values(java.lang.String startScope, int opFlags, java.lang.String propName)
Description copied from class:Context
Retrieves theNamedValue
objects whosename
field matches the given name or name pattern. This method allows for wildcard searches, which means that there can be multiple matches and therefore multiple values returned. If the property is not found at the indicated level, the search continues up the context object tree until a match is found or allContext
objects in the chain have been exhausted.If no match is found, an error is returned and no property list is returned.
- Specified by:
get_values
in classContext
- Parameters:
startScope
- aString
object indicating the context object level at which to initiate the search for the specified properties (for example, "_USER", "_GROUP", "_SYSTEM"). Valid scope names are implementation-specific. If a scope name is omitted, the search begins with the specified context object. If the specified scope name is not found, an exception is returned.opFlags
- an operation flag. The one flag that may be specified isCTX_RESTRICT_SCOPE
. If this flag is specified, searching is limited to the specifiedstart_scope
or thisContext
object.propName
- the property name whose values are to be retrieved.pattern
may be a name or a name with a trailing wildcard character ("*").- Returns:
- an
NVList
containing all the property values (in the form ofNamedValue
objects) whose associated property name matches the given name or name pattern - See Also:
Context.set_values(org.omg.CORBA.NVList)
,NamedValue
-
-