📄 remoteref.html
字号:
<!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 May 30 13:46:51 EDT 2002 --><TITLE>J2ME RMI Optional Package Specification v1.0: Interface RemoteRef</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> </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="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>J2ME RMI Optional Package</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../java/rmi/server/RemoteCall.html"><B>PREV CLASS</B></A> <A HREF="../../../java/rmi/server/RMIClientSocketFactory.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="RemoteRef.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.rmi.server</FONT><BR>Interface RemoteRef</H2><DL><DT><B>All Superinterfaces:</B> <DD>java.io.Externalizable, java.io.Serializable</DD></DL><HR><DL><DT>public interface <B>RemoteRef</B><DT>extends java.io.Externalizable</DL><P><code>RemoteRef</code> represents the handle for a remote object. A <code>RemoteStub</code> uses a remote reference to carry out a remote method invocation to a remote object.<P><DL><DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../../java/rmi/server/RemoteStub.html"><CODE>RemoteStub</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RemoteRef.html#packagePrefix">packagePrefix</A></B></CODE><BR> Initialize the server package prefix: assumes that the implementation of server ref classes (e.g., UnicastRef, UnicastServerRef) are located in the package defined by the prefix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RemoteRef.html#serialVersionUID">serialVersionUID</A></B></CODE><BR> indicate compatibility with JDK 1.1.x version of class.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== 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> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RemoteRef.html#getRefClass(java.io.ObjectOutput)">getRefClass</A></B>(java.io.ObjectOutput out)</CODE><BR> Returns the class name of the ref type to be serialized onto the stream 'out'.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RemoteRef.html#invoke(java.rmi.Remote, java.lang.reflect.Method, java.lang.Object[], long)">invoke</A></B>(<A HREF="../../../java/rmi/Remote.html">Remote</A> obj, java.lang.reflect.Method method, java.lang.Object[] params, long opnum)</CODE><BR> Invoke a method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RemoteRef.html#remoteEquals(java.rmi.server.RemoteRef)">remoteEquals</A></B>(<A HREF="../../../java/rmi/server/RemoteRef.html">RemoteRef</A> obj)</CODE><BR> Compares two remote objects for equality.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RemoteRef.html#remoteHashCode()">remoteHashCode</A></B>()</CODE><BR> Returns a hashcode for a remote object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/server/RemoteRef.html#remoteToString()">remoteToString</A></B>()</CODE><BR> Returns a String that represents the reference of this remote object.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.io.Externalizable"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.io.Externalizable</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>readExternal, writeExternal</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="serialVersionUID"><!-- --></A><H3>serialVersionUID</H3><PRE>public static final long <B>serialVersionUID</B></PRE><DL><DD>indicate compatibility with JDK 1.1.x version of class.</DL><HR><A NAME="packagePrefix"><!-- --></A><H3>packagePrefix</H3><PRE>public static final java.lang.String <B>packagePrefix</B></PRE><DL><DD>Initialize the server package prefix: assumes that the implementation of server ref classes (e.g., UnicastRef, UnicastServerRef) are located in the package defined by the prefix.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="invoke(java.rmi.Remote, java.lang.reflect.Method, java.lang.Object[], long)"><!-- --></A><H3>invoke</H3><PRE>public java.lang.Object <B>invoke</B>(<A HREF="../../../java/rmi/Remote.html">Remote</A> obj, java.lang.reflect.Method method, java.lang.Object[] params, long opnum) throws java.lang.Exception</PRE><DL><DD>Invoke a method. This form of delegating method invocation to the reference allows the reference to take care of setting up the connection to the remote host, marshaling some representation for the method and parameters, then communicating the method invocation to the remote host. This method either returns the result of a method invocation on the remote object which resides on the remote host or throws a RemoteException if the call failed or an application-level exception if the remote invocation throws an exception.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object that contains the RemoteRef (e.g., the RemoteStub for the object.<DD><CODE>method</CODE> - the method to be invoked<DD><CODE>params</CODE> - the parameter list<DD><CODE>opnum</CODE> - a hash that may be used to represent the method<DT><B>Returns:</B><DD>result of remote method invocation<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if any exception occurs during remote method invocation<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="getRefClass(java.io.ObjectOutput)"><!-- --></A><H3>getRefClass</H3><PRE>public java.lang.String <B>getRefClass</B>(java.io.ObjectOutput out)</PRE><DL><DD>Returns the class name of the ref type to be serialized onto the stream 'out'.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - the output stream to which the reference will be serialized<DT><B>Returns:</B><DD>the class name (without package qualification) of the reference type<DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="remoteHashCode()"><!-- --></A><H3>remoteHashCode</H3><PRE>public int <B>remoteHashCode</B>()</PRE><DL><DD>Returns a hashcode for a remote object. Two remote object stubs that refer to the same remote object will have the same hash code (in order to support remote objects as keys in hash tables).<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>remote object hashcode<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><CODE>Hashtable</CODE></DL></DD></DL><HR><A NAME="remoteEquals(java.rmi.server.RemoteRef)"><!-- --></A><H3>remoteEquals</H3><PRE>public boolean <B>remoteEquals</B>(<A HREF="../../../java/rmi/server/RemoteRef.html">RemoteRef</A> obj)</PRE><DL><DD>Compares two remote objects for equality. Returns a boolean that indicates whether this remote object is equivalent to the specified Object. This method is used when a remote object is stored in a hashtable.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the Object to compare with<DT><B>Returns:</B><DD>true if these Objects are equal; false otherwise.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><CODE>Hashtable</CODE></DL></DD></DL><HR><A NAME="remoteToString()"><!-- --></A><H3>remoteToString</H3><PRE>public java.lang.String <B>remoteToString</B>()</PRE><DL><DD>Returns a String that represents the reference of this remote object.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>string representing remote object reference<DT><B>Since: </B><DD>JDK1.1</DD></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="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>J2ME RMI Optional Package</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../java/rmi/server/RemoteCall.html"><B>PREV CLASS</B></A> <A HREF="../../../java/rmi/server/RMIClientSocketFactory.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="RemoteRef.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1">Copyright 1994-2002 Sun Microsystems, Inc. All Rights Reserved.</font> </BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -