activatable.html

来自「API資料大全」· HTML 代码 · 共 735 行 · 第 1/4 页

HTML
735 行
字号
 This method does not need to be called if <code>obj</code> extends <code>Activatable</code>, since the first constructor calls this method.<DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object being exported<DD><CODE>location</CODE> - the object's code location<DD><CODE>data</CODE> - the object's bootstrapping data<DD><CODE>restart</CODE> - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand.  Specifying <code>restart</code> to be <code>true</code> does not force an initial immediate activation of a newly registered object;  initial activation is lazy.<DD><CODE>port</CODE> - the port on which the object is exported (an anonymous port is used if port=0)<DT><B>Returns:</B><DD>the activation identifier obtained from registering the descriptor, <code>desc</code>, with the activation system the wrong group<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></CODE> - if activation group is not active<DD><CODE><A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></CODE> - if object registration or export fails<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)"><!-- --></A><H3>exportObject</H3><PRE>public static <A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A> <B>exportObject</B>(<A HREF="../../../java/rmi/Remote.html">Remote</A>&nbsp;obj,                                        <A HREF="../../../java/lang/String.html">String</A>&nbsp;location,                                        <A HREF="../../../java/rmi/MarshalledObject.html">MarshalledObject</A>&nbsp;data,                                        boolean&nbsp;restart,                                        int&nbsp;port,                                        <A HREF="../../../java/rmi/server/RMIClientSocketFactory.html">RMIClientSocketFactory</A>&nbsp;csf,                                        <A HREF="../../../java/rmi/server/RMIServerSocketFactory.html">RMIServerSocketFactory</A>&nbsp;ssf)                                 throws <A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A>,                                        <A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></PRE><DL><DD>This <code>exportObject</code> method may be invoked explicitly by an "activatable" object, that does not extend the <code>Activatable</code> class, in order to both a) register the object's activation descriptor, constructed from the supplied <code>location</code>, and <code>data</code>, with the activation system (so the object can be activated), and b) export the remote object, <code>obj</code>, on a specific port (if port=0, then an anonymous port is chosen). Once the object is exported, it can receive incoming RMI calls.<p> This method does not need to be called if <code>obj</code> extends <code>Activatable</code>, since the first constructor calls this method.<DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object being exported<DD><CODE>location</CODE> - the object's code location<DD><CODE>data</CODE> - the object's bootstrapping data<DD><CODE>restart</CODE> - if true, the object is restarted (reactivated) when either the activator is restarted or the object's activation group is restarted after an unexpected crash; if false, the object is only activated on demand.  Specifying <code>restart</code> to be <code>true</code> does not force an initial immediate activation of a newly registered object;  initial activation is lazy.<DD><CODE>port</CODE> - the port on which the object is exported (an anonymous port is used if port=0)<DD><CODE>csf</CODE> - the client-side socket factory for making calls to the remote object<DD><CODE>ssf</CODE> - the server-side socket factory for receiving remote calls<DT><B>Returns:</B><DD>the activation identifier obtained from registering the descriptor, <code>desc</code>, with the activation system the wrong group<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></CODE> - if activation group is not active<DD><CODE><A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></CODE> - if object registration or export fails<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int)"><!-- --></A><H3>exportObject</H3><PRE>public static <A HREF="../../../java/rmi/Remote.html">Remote</A> <B>exportObject</B>(<A HREF="../../../java/rmi/Remote.html">Remote</A>&nbsp;obj,                                  <A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A>&nbsp;id,                                  int&nbsp;port)                           throws <A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></PRE><DL><DD>Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls. The object is exported on an anonymous port, if <code>port</code> is zero. <p> During activation, this <code>exportObject</code> method should be invoked explicitly by an "activatable" object, that does not extend the <code>Activatable</code> class. There is no need for objects that do extend the <code>Activatable</code> class to invoke this method directly; this method is called by the second constructor above (which a subclass should invoke from its special activation constructor).<DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the remote object implementation<DD><CODE>id</CODE> - the object's  activation identifier<DD><CODE>port</CODE> - the port on which the object is exported (an anonymous port is used if port=0)<DT><B>Returns:</B><DD>the stub for the activatable remote object<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></CODE> - if object export fails<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="exportObject(java.rmi.Remote, java.rmi.activation.ActivationID, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)"><!-- --></A><H3>exportObject</H3><PRE>public static <A HREF="../../../java/rmi/Remote.html">Remote</A> <B>exportObject</B>(<A HREF="../../../java/rmi/Remote.html">Remote</A>&nbsp;obj,                                  <A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A>&nbsp;id,                                  int&nbsp;port,                                  <A HREF="../../../java/rmi/server/RMIClientSocketFactory.html">RMIClientSocketFactory</A>&nbsp;csf,                                  <A HREF="../../../java/rmi/server/RMIServerSocketFactory.html">RMIServerSocketFactory</A>&nbsp;ssf)                           throws <A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></PRE><DL><DD>Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls. The object is exported on an anonymous port, if <code>port</code> is zero. <p> During activation, this <code>exportObject</code> method should be invoked explicitly by an "activatable" object, that does not extend the <code>Activatable</code> class. There is no need for objects that do extend the <code>Activatable</code> class to invoke this method directly; this method is called by the second constructor above (which a subclass should invoke from its special activation constructor).<DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the remote object implementation<DD><CODE>id</CODE> - the object's  activation identifier<DD><CODE>port</CODE> - the port on which the object is exported (an anonymous port is used if port=0)<DD><CODE>csf</CODE> - the client-side socket factory for making calls to the remote object<DD><CODE>ssf</CODE> - the server-side socket factory for receiving remote calls<DT><B>Returns:</B><DD>the stub for the activatable remote object<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></CODE> - if object export fails<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="unexportObject(java.rmi.Remote, boolean)"><!-- --></A><H3>unexportObject</H3><PRE>public static boolean <B>unexportObject</B>(<A HREF="../../../java/rmi/Remote.html">Remote</A>&nbsp;obj,                                     boolean&nbsp;force)                              throws <A HREF="../../../java/rmi/NoSuchObjectException.html">NoSuchObjectException</A></PRE><DL><DD>Remove the remote object, obj, from the RMI runtime. If successful, the object can no longer accept incoming RMI calls. If the force parameter is true, the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress.  If the force parameter is false, the object is only unexported if there are no pending or in progress calls to the object.<DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the remote object to be unexported<DD><CODE>force</CODE> - if true, unexports the object even if there are pending or in-progress calls; if false, only unexports the object if there are no pending or in-progress calls<DT><B>Returns:</B><DD>true if operation is successful, false otherwise<DT><B>Throws:</B><DD><CODE>NoSuchObjectException</CODE> - if the remote object is not currently exported<DT><B>Since: </B><DD>1.2</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>&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/Activatable.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;PREV CLASS&nbsp;&nbsp;<A HREF="../../../java/rmi/activation/ActivationDesc.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="Activatable.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;<A HREF="#fields_inherited_from_class_java.rmi.server.RemoteObject">FIELD</A>&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><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 + =
减小字号Ctrl + -
显示快捷键?