Java Doc for Context.java in  » 6.0-JDK-Modules-sun » omg » org » omg » CORBA » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules sun » omg » org.omg.CORBA 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.omg.CORBA.Object
   org.omg.CORBA.Context

Context
abstract public class Context (Code)
An object used in Request operations to specify the context object in which context strings must be resolved before being sent along with the request invocation. A Context object contains a list of properties in the form of NamedValue objects. These properties represent information about the client, the environment, or the circumstances of a request and generally are properties that might be inconvenient to pass as parameters.

A Context object is created by first calling the ORB method get_default_context and then calling the method create_child on the default context.

Each property in a Context object is represented by a NamedValue object. The property name is contained in the NamedValue object's name field, and the value associated with the name is contained in the Any object that was assigned to the NamedValue object's value field.

Context properties can represent a portion of a client's or application's environment that is meant to be propagated to (and made implicitly part of) a server's environment. (Examples might be a window identifier or user preference information). Once a server has been invoked (that is, after the properties are propagated), the server may query its Context object for these properties using the method get_values.

When an operation declaration includes a context clause, the stubs and skeletons will have an additional argument added for the context. When an operation invocation occurs, the ORB causes the properties that were named in the operation definition in IDL and that are present in the client's Context object to be provided in the Context object parameter to the invoked method.

Context property names (which are strings) typically have the form of an OMG IDL identifier or a series of OMG IDL identifiers separated by periods. A context property name pattern is either a property name or a property name followed by a single "*". A property name pattern without a trailing "*" is said to match only itself. A property name pattern of the form "<name>*" matches any property name that starts with <name> and continues with zero or more additional characters.

Property name patterns are used in the context clause of an operation definition and as a parameter for the method Context.get_values.

Context objects may be "chained" together to achieve a particular defaulting behavior. A Context object created with the method create_child will be chained to its parent (the Context object that created it), and that means that the parent will be searched after the child in a search for property names.

Properties defined in a particular Context object effectively override those properties in the next higher level. The scope used in a search for properties may be restricted by specifying a starting scope and by using the flag CTX_RESTRICT_SCOPE when invoking the method get_values.

A Context object may be named for purposes of specifying a starting search scope.
version:
   1.11, 09/09/97
since:
   JDK1.2





Method Summary
abstract public  Stringcontext_name()
     Retrieves the name of this Context object.
abstract public  Contextcreate_child(String child_ctx_name)
     Creates a Context object with the given string as its name and with this Context object set as its parent.

The new Context object is chained into its parent Context object.

abstract public  voiddelete_values(String propname)
     Deletes from this Context object the NamedValue object(s) whose name field matches the given property name. If the String object supplied for propname has a trailing wildcard character ("*"), then all NamedValue objects whose name fields match will be deleted.
abstract public  NVListget_values(String start_scope, int op_flags, String pattern)
     Retrieves the NamedValue objects whose name field matches the given name or name pattern.
abstract public  Contextparent()
     Retrieves the parent of this Context object.
abstract public  voidset_one_value(String propname, Any propvalue)
     Creates a NamedValue object and adds it to this Context object.
abstract public  voidset_values(NVList values)
     I Sets one or more property values in this Context object.



Method Detail
context_name
abstract public String context_name()(Code)
Retrieves the name of this Context object. the name of this Context object



create_child
abstract public Context create_child(String child_ctx_name)(Code)
Creates a Context object with the given string as its name and with this Context object set as its parent.

The new Context object is chained into its parent Context 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.
Parameters:
  child_ctx_name - the String object to be set asthe name of the new Context object the newly-created child Context objectinitialized with the specified name




delete_values
abstract public void delete_values(String propname)(Code)
Deletes from this Context object the NamedValue object(s) whose name field matches the given property name. If the String object supplied for propname has a trailing wildcard character ("*"), then all NamedValue objects whose name fields match will be deleted. The search scope is always limited to this Context object.

If no matching property is found, an exception is returned.
Parameters:
  propname - name of the property to be deleted




get_values
abstract public NVList get_values(String start_scope, int op_flags, String pattern)(Code)
Retrieves the NamedValue objects whose name 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 all Context objects in the chain have been exhausted.

If no match is found, an error is returned and no property list is returned.
Parameters:
  start_scope - a String object indicating thecontext object level at which to initiate thesearch for the specified properties(for example, "_USER", "_GROUP", "_SYSTEM"). Valid scopenames are implementation-specific. If ascope name is omitted, the searchbegins with the specified contextobject. If the specified scope name isnot found, an exception is returned.
Parameters:
  op_flags - an operation flag. The one flagthat may be specified is CTX_RESTRICT_SCOPE.If this flag is specified, searching is limited to thespecified start_scope or thisContext object.
Parameters:
  pattern - the property name whose values are tobe retrieved. pattern may be aname or a name with atrailing wildcard character ("*"). an NVList containing all the property values(in the form of NamedValue objects)whose associated property name matches the given name orname pattern
See Also:   Context.set_values
See Also:   org.omg.CORBA.NamedValue




parent
abstract public Context parent()(Code)
Retrieves the parent of this Context object. the Context object that is theparent of this Context object



set_one_value
abstract public void set_one_value(String propname, Any propvalue)(Code)
Creates a NamedValue object and adds it to this Context object. The name field of the new NamedValue object is set to the given string, the value field is set to the given Any object, and the flags field is set to zero.
Parameters:
  propname - the name of the property to be set
Parameters:
  propvalue - the Any object to which thevalue of the property will be set. TheAny object's valuefield contains the value to be associatedwith the given propname; thekind field must be set toTCKind.tk_string.



set_values
abstract public void set_values(NVList values)(Code)
I Sets one or more property values in this Context object. The NVList supplied to this method contains one or more NamedValue objects. In each NamedValue object, the name field holds the name of the property, and the flags field must be set to zero. The NamedValue object's value field contains an Any object, which, in turn, contains the value for the property. Since the value is always a string, the Any object must have the kind field of its TypeCode set to TCKind.tk_string.
Parameters:
  values - an NVList containing the propertynames and associated values to be set
See Also:   Context.get_values
See Also:   org.omg.CORBA.NamedValue
See Also:   org.omg.CORBA.Any



Methods inherited from org.omg.CORBA.Object
Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result)(Code)(Java Doc)
Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)(Code)(Java Doc)
org.omg.CORBA.Object _duplicate()(Code)(Java Doc)
DomainManager[] _get_domain_managers()(Code)(Java Doc)
org.omg.CORBA.Object _get_interface_def()(Code)(Java Doc)
Policy _get_policy(int policy_type)(Code)(Java Doc)
int _hash(int maximum)(Code)(Java Doc)
boolean _is_a(String repositoryIdentifier)(Code)(Java Doc)
boolean _is_equivalent(org.omg.CORBA.Object other)(Code)(Java Doc)
boolean _non_existent()(Code)(Java Doc)
void _release()(Code)(Java Doc)
Request _request(String operation)(Code)(Java Doc)
org.omg.CORBA.Object _set_policy_override(Policy[] policies, SetOverrideType set_add)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.