📄 delegate.html
字号:
behavior of is_local() is to return false.</DL></DD></DL><HR><A NAME="servant_preinvoke(org.omg.CORBA.Object, java.lang.String, java.lang.Class)"><!-- --></A><H3>servant_preinvoke</H3><PRE>public <A HREF="../../../../org/omg/CORBA/portable/ServantObject.html">ServantObject</A> <B>servant_preinvoke</B>(<A HREF="../../../../org/omg/CORBA/Object.html">Object</A> self, <A HREF="../../../../java/lang/String.html">String</A> operation, <A HREF="../../../../java/lang/Class.html">Class</A> expectedType)</PRE><DL><DD>Returns a Java reference to the servant which should be used for this request. servant_preinvoke() is invoked by a local stub. If a ServantObject object is returned, then its servant field has been set to an object of the expected type (Note: the object may or may not be the actual servant instance). The local stub may cast the servant field to the expected type, and then invoke the operation directly. The ServantRequest object is valid for only one invocation, and cannot be used for more than one invocation.<DD><DL><DT><B>Parameters:</B><DD><CODE>self</CODE> - The object reference which delegated to this delegate.<DD><CODE>operation</CODE> - a string containing the operation name. The operation name corresponds to the operation name as it would be encoded in a GIOP request.<DD><CODE>expectedType</CODE> - a Class object representing the expected type of the servant. The expected type is the Class object associated with the operations class of the stub's interface (e.g. A stub for an interface Foo, would pass the Class object for the FooOperations interface).<DT><B>Returns:</B><DD>a ServantObject object. The method may return a null value if it does not wish to support this optimization (e.g. due to security, transactions, etc). The method must return null if the servant is not of the expected type.</DL></DD></DL><HR><A NAME="servant_postinvoke(org.omg.CORBA.Object, org.omg.CORBA.portable.ServantObject)"><!-- --></A><H3>servant_postinvoke</H3><PRE>public void <B>servant_postinvoke</B>(<A HREF="../../../../org/omg/CORBA/Object.html">Object</A> self, <A HREF="../../../../org/omg/CORBA/portable/ServantObject.html">ServantObject</A> servant)</PRE><DL><DD>servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant. This method must be called if servant_preinvoke() returned a non-null value, even if an exception was thrown by the servant's method. For this reason, the call to servant_postinvoke() should be placed in a Java finally clause.<DD><DL><DT><B>Parameters:</B><DD><CODE>self</CODE> - The object reference which delegated to this delegate.<DD><CODE>servant</CODE> - the instance of the ServantObject returned from the servant_preinvoke() method.</DL></DD></DL><HR><A NAME="request(org.omg.CORBA.Object, java.lang.String, boolean)"><!-- --></A><H3>request</H3><PRE>public <A HREF="../../../../org/omg/CORBA/portable/OutputStream.html">OutputStream</A> <B>request</B>(<A HREF="../../../../org/omg/CORBA/Object.html">Object</A> self, <A HREF="../../../../java/lang/String.html">String</A> operation, boolean responseExpected)</PRE><DL><DD>request is called by a stub to obtain an OutputStream for marshaling arguments. The stub must supply the operation name, and indicate if a response is expected (i.e is this a oneway call).<DD><DL><DT><B>Parameters:</B><DD><CODE>self</CODE> - The object reference which delegated to this delegate.<DD><CODE>operation</CODE> - a string containing the operation name. The operation name corresponds to the operation name as it would be encoded in a GIOP request.<DD><CODE>responseExpected</CODE> - false if the operation is a one way operation, and true otherwise.<DT><B>Returns:</B><DD>OutputStream the OutputStream into which request arguments can be marshaled.<DT><B>See Also: </B><DD><a href="package-summary.html#unimpl"><code>portable</code> package comments for unimplemented features</a></DL></DD></DL><HR><A NAME="invoke(org.omg.CORBA.Object, org.omg.CORBA.portable.OutputStream)"><!-- --></A><H3>invoke</H3><PRE>public <A HREF="../../../../org/omg/CORBA/portable/InputStream.html">InputStream</A> <B>invoke</B>(<A HREF="../../../../org/omg/CORBA/Object.html">Object</A> self, <A HREF="../../../../org/omg/CORBA/portable/OutputStream.html">OutputStream</A> output) throws <A HREF="../../../../org/omg/CORBA/portable/ApplicationException.html">ApplicationException</A>, <A HREF="../../../../org/omg/CORBA/portable/RemarshalException.html">RemarshalException</A></PRE><DL><DD>invoke is called by a stub to invoke an operation. The stub provides an OutputStream that was previously returned by a request() call. invoke returns an InputStream which contains the marshaled reply. If an exception occurs, invoke may throw an ApplicationException object which contains an InputStream from which the user exception state may be unmarshaled.<DD><DL><DT><B>Parameters:</B><DD><CODE>self</CODE> - The object reference which delegated to this delegate.<DD><CODE>output</CODE> - the OutputStream which contains marshaled arguments<DT><B>Returns:</B><DD>input the InputStream from which reply parameters can be unmarshaled.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/omg/CORBA/portable/ApplicationException.html">ApplicationException</A></CODE> - thrown when implementation throws (upon invocation) an exception defined as part of its remote method definition.<DD><CODE><A HREF="../../../../org/omg/CORBA/portable/RemarshalException.html">RemarshalException</A></CODE> - thrown when remarshalling fails.<DT><B>See Also: </B><DD><a href="package-summary.html#unimpl"><code>portable</code> package comments for unimplemented features</a></DL></DD></DL><HR><A NAME="releaseReply(org.omg.CORBA.Object, org.omg.CORBA.portable.InputStream)"><!-- --></A><H3>releaseReply</H3><PRE>public void <B>releaseReply</B>(<A HREF="../../../../org/omg/CORBA/Object.html">Object</A> self, <A HREF="../../../../org/omg/CORBA/portable/InputStream.html">InputStream</A> input)</PRE><DL><DD>releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed. The stub passes the InputStream returned by invoke() or ApplicationException.getInputStream(). A null value may also be passed to releaseReply, in which case the method is a noop.<DD><DL><DT><B>Parameters:</B><DD><CODE>self</CODE> - The object reference which delegated to this delegate.<DD><CODE>input</CODE> - the InputStream returned from invoke().<DT><B>See Also: </B><DD><a href="package-summary.html#unimpl"><code>portable</code> package comments for unimplemented features</a></DL></DD></DL><HR><A NAME="toString(org.omg.CORBA.Object)"><!-- --></A><H3>toString</H3><PRE>public <A HREF="../../../../java/lang/String.html">String</A> <B>toString</B>(<A HREF="../../../../org/omg/CORBA/Object.html">Object</A> self)</PRE><DL><DD>Provide the implementation to override the toString() method of the delegating CORBA object.<DD><DL><DT><B>Parameters:</B><DD><CODE>self</CODE> - The object reference which delegated to this delegate.</DL></DD></DL><HR><A NAME="hashCode(org.omg.CORBA.Object)"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>(<A HREF="../../../../org/omg/CORBA/Object.html">Object</A> self)</PRE><DL><DD>Provide the implementation to override the hashCode() method of the delegating CORBA object.<DD><DL><DT><B>Parameters:</B><DD><CODE>self</CODE> - The object reference which delegated to this delegate.</DL></DD></DL><HR><A NAME="equals(org.omg.CORBA.Object, java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../../../org/omg/CORBA/Object.html">Object</A> self, <A HREF="../../../../java/lang/Object.html">Object</A> obj)</PRE><DL><DD>Provide the implementation to override the equals(java.lang.Object obj) method of the delegating CORBA object.<DD><DL><DT><B>Parameters:</B><DD><CODE>self</CODE> - The object reference which delegated to this delegate.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Delegate.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../../org/omg/CORBA/portable/InputStream.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> <A HREF="Delegate.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -