⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 context.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:43:06 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  Context</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Context.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../org/omg/CORBA/CompletionStatusHelper.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/omg/CORBA/ContextList.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Context.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.omg.CORBA</FONT><BR>Class  Context</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A>  |  +--<B>org.omg.CORBA.Context</B></PRE><HR><DL><DT>public abstract class <B>Context</B><DT>extends <A HREF="../../../java/lang/Object.html">Object</A></DL><P>An object used in <code>Request</code> operations to specify the context object in which context strings must be resolved before being sent along with the request invocation. A <code>Context</code> object contains a list of properties in the form of <code>NamedValue</code> 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. <P> A <code>Context</code> object is created by first calling the <code>ORB</code> method <code>get_default_context</code> and then calling the method <code>create_child</code> on the default context. <P> Each property in a <code>Context</code> object is represented by a <code>NamedValue</code> object.  The property name is contained in the <code>NamedValue</code> object's <code>name</code> field, and the value associated with the name is contained in the <code>Any</code> object that was assigned to the <code>NamedValue</code> object's <code>value</code> field. <P> <code>Context</code> 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 <code>Context</code> object for these properties using the method <code>get_values</code>.<P> 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 <code>Context</code> object to be provided in the <code>Context</code> object parameter to the invoked method. <P> <code>Context</code> 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 "&lt;name&gt;*" matches any property name that starts with &lt;name&gt; and continues with zero or more additional characters. <P> Property name patterns are used in the context clause of an operation definition and as a parameter for the method <code>Context.get_values</code>. <P> <code>Context</code> objects may be "chained" together to achieve a particular defaulting behavior.  A <code>Context</code> object created with the method <code>create_child</code> will be chained to its parent (the <code>Context</code> object that created it), and that means that the parent will be searched after the child in a search for property names.<P> Properties defined in a particular <code>Context</code> 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 <code>CTX_RESTRICT_SCOPE</code> when invoking the method <code>get_values</code>. <P> A <code>Context</code> object may be named for purposes of specifying a starting search scope.<P><DL><DT><B>Since: </B><DD>JDK1.2</DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../org/omg/CORBA/Context.html#Context()">Context</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Context.html#context_name()">context_name</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the name of this <code>Context</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../org/omg/CORBA/Context.html">Context</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Context.html#create_child(java.lang.String)">create_child</A></B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;child_ctx_name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>Context</code> object with the given string as its name and with this <code>Context</code> object set as its parent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Context.html#delete_values(java.lang.String)">delete_values</A></B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;propname)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes from this <code>Context</code> object the <code>NamedValue</code> object(s) whose <code>name</code> field matches the given property name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../org/omg/CORBA/NVList.html">NVList</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Context.html#get_values(java.lang.String, int, java.lang.String)">get_values</A></B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;start_scope,           int&nbsp;op_flags,           <A HREF="../../../java/lang/String.html">String</A>&nbsp;pattern)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the <code>NamedValue</code> objects whose <code>name</code> field matches the given name or name pattern.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../org/omg/CORBA/Context.html">Context</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Context.html#parent()">parent</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the parent of this <code>Context</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Context.html#set_one_value(java.lang.String, org.omg.CORBA.Any)">set_one_value</A></B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;propname,              <A HREF="../../../org/omg/CORBA/Any.html">Any</A>&nbsp;propvalue)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>NamedValue</code> object and adds it to this <code>Context</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Context.html#set_values(org.omg.CORBA.NVList)">set_values</A></B>(<A HREF="../../../org/omg/CORBA/NVList.html">NVList</A>&nbsp;values)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I Sets one or more property values in this <code>Context</code> object.</TD></TR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -