[Previous] [Contents] [Next] [IONA Technologies]


CORBA.Context



Contents

CORBA.Context.Context()
CORBA.Context.Context()
CORBA.Context.Context()
CORBA.Context.Context()
CORBA.Context._nil()
CORBA.Context.context_name()
CORBA.Context.create_child()
CORBA.Context.delete_values()
CORBA.Context.get_count()
CORBA.Context.get_count_all()
CORBA.Context.get_values()
CORBA.Context.IT_create()
CORBA.Context.parent()
CORBA.Context.set_one_value()
CORBA.Context.set_values()


Synopsis:

The Java class Context implements the OMG pseudo interface Context. A context is intended to represent information about the client which is inconvenient to pass via parameters.

An IDL operation can specify that it is to be provided with the client's mapping for particular identifiers (properties)–it does this by listing these identifiers following the operation declaration in a context clause. An IDL operation that specifies a context clause is mapped to a Java method which takes an extra input parameter of type IE.Iona.Orbix.CORBA.Context, at the end of the parameter list. A client can optionally maintain one or more Context objects, which provide a mapping from identifiers (string names) to string values. A Context object contains a list of properties; each property consists of a name and a string value associated with that name and can be passed to a method that takes a Context parameter.

Contexts can be arranged in a hierarchy by specifying parent-child relationships among them. Then, a child passed to an operation also includes the identifiers of its parent(s). The called operation can decide whether to use just the context actually passed, or the hierarchy above it.

CORBA:

OrbixWeb:

See Also:



CORBA.Context.Context()


Synopsis:

Description:

Creates a new context which is not a child context.

Notes:

CORBA defined.

See Also:

Other Context constructors.



CORBA.Context.Context()


Synopsis:

Description:

Creates a new context (not a child context) with a specified name.

Parameters:



     name
    
The name of the context.

Notes:

OrbixWeb specific.

See Also:

Other Context constructors.



CORBA.Context.Context()


Synopsis:

Description:

Creates a new child context.

Parameters:



     parent
    
The parent context.

Notes:

OrbixWeb specific.

See Also:

Other Context constructors.



CORBA.Context.Context()


Synopsis:

Description:

Creates a new child context with a specified name.

Parameters:



     name
    
The name of the context.

     parent
    
The parent context.

Notes:

OrbixWeb specific.

See Also:

Other Context constructors.



CORBA.Context._nil()


Synopsis:

Description:

Returns a nil object reference for a Context object.

Notes:

CORBA defined.



CORBA.Context.context_name()


Synopsis:

Description:

Returns the name of the Context object.

See Also:



CORBA.Context.create_child()


Synopsis:

Description:

Creates a child context of the current context. When a child context is passed as a parameter to an operation, any searches (using CORBA.Context.get_values()) will look in parent contexts if necessary to find matching property names.

Parameters:



     ctx_name
    
The name of the child context. Context object names follow the rules for IDL identifiers.

     hctx
    
The newly created context, stored in a ContextHolder object. A programmer who wishes to call this method should instantiate the ContextHolder object in advance, in line with the standard rules for management of holder types.

Return Value:

Returns 1 if successful; returns 0 otherwise.

Notes:

CORBA defined.

See Also:



CORBA.Context.delete_values()


Synopsis:

Description:

Deletes the specified property value(s) from the context. The search scope is limited to the Context object on which the invocation is made.

Parameters:



     prop_name
    
The property name to be deleted. If prop_name has a trailing `*', then all matching properties will be deleted.

Return Value:

Returns 1 (true) if successful; returns 0 (false) otherwise. An exception is raised if no matching property is found.

Notes:

CORBA defined.



CORBA.Context.get_count()


Synopsis:

Description:

Finds the number of property/value pairs in the context.

Notes:

OrbixWeb specific.

See Also:



CORBA.Context.get_count_all()


Synopsis:

Description:

Finds the number of property/value pairs in this context and all its parent contexts.

Notes:

OrbixWeb specific.

See Also:



CORBA.Context.get_values()


Synopsis:

Description:

Retrieves the specified context property values.

Parameters:



     start_scope
    
The context in which the search for the values requested should be started. The name of a direct or indirect parent context may be specified to this parameter. If the null string is passed, then the search begins in the context which is the target of the call.

     op_flags
    
By default, searching of identifiers will propagate upwards to parent contexts; if _CORBA.CTX_RESTRICT_SCOPE is specified, then searching is limited to the specified search scope or context object.

     prop_name
    
If prop_name has a trailing `*', then all matching properties and their values are returned.

     hvalues
    
An NVList holder object to contain the returned property values. A programmer who wishes to call this method should instantiate the NVListHolder object in advance, in line with the standard rules for management of holder types.

Return Value:

Returns 1 if matching properties are found; returns 0 otherwise.

Notes:

CORBA defined.



CORBA.Context.IT_create()


Synopsis:

Description:

In the absence of a CORBA specified way to create a (top level) Context pseudo object, OrbixWeb provides the IT_create() method to initialise an object reference for a Context.

Use of this method is recommended in preference to Java new to ensure portablility across future OrbixWeb versions.

Notes:

OrbixWeb specific.

See Also:

Context constructors.



CORBA.Context.parent()


Synopsis:

Description:

Returns the parent of the Context object.

See Also:



CORBA.Context.set_one_value()


Synopsis:

Description:

Adds property name and value to context. Although the value member is of type Any, the type of the Any must be a string.

Parameters:



     prop_name
    
The name of the property to add.

     value
    
The value of the property to add.

Return Value:

Returns 1 if successful; returns 0 otherwise.

Notes:

CORBA defined.

See Also:



CORBA.Context.set_values()


Synopsis:

Description:

Sets one or more property values in the context. The previous value of the property, if any, is discarded.

Parameters:



     values
    
An NVList containing the property_name:values to add or change. In the NVList, the flags field must be set to zero, and the TypeCode associated with an attribute value must be _CORBA. _tc_string.

Return Value:

Returns 1 if successful; returns 0 otherwise.

Notes:

CORBA defined.

See Also:



[Roadmap] [Utilities] [Compiling] [Configuration]
[Class Reference] [IR Reference] [Daemon Reference] [IDL Grammar] [System Exceptions]
[Index]