activatable.html
来自「API資料大全」· HTML 代码 · 共 735 行 · 第 1/4 页
HTML
735 行
int port, <A HREF="../../../java/rmi/server/RMIClientSocketFactory.html">RMIClientSocketFactory</A> csf, <A HREF="../../../java/rmi/server/RMIServerSocketFactory.html">RMIServerSocketFactory</A> ssf)</CODE><BR> Export the activatable remote object to the RMI runtime to make the object available to receive incoming calls.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/Activatable.html#exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int)">exportObject</A></B>(<A HREF="../../../java/rmi/Remote.html">Remote</A> obj, <A HREF="../../../java/lang/String.html">String</A> location, <A HREF="../../../java/rmi/MarshalledObject.html">MarshalledObject</A> data, boolean restart, int port)</CODE><BR> 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).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/Activatable.html#exportObject(java.rmi.Remote, java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)">exportObject</A></B>(<A HREF="../../../java/rmi/Remote.html">Remote</A> obj, <A HREF="../../../java/lang/String.html">String</A> location, <A HREF="../../../java/rmi/MarshalledObject.html">MarshalledObject</A> data, boolean restart, int port, <A HREF="../../../java/rmi/server/RMIClientSocketFactory.html">RMIClientSocketFactory</A> csf, <A HREF="../../../java/rmi/server/RMIServerSocketFactory.html">RMIServerSocketFactory</A> ssf)</CODE><BR> 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).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/Activatable.html#getID()">getID</A></B>()</CODE><BR> Returns the object's activation identifier.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/Activatable.html#inactive(java.rmi.activation.ActivationID)">inactive</A></B>(<A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A> id)</CODE><BR> Informs the system that the object with the corresponding activation <code>id</code> is currently inactive.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/rmi/Remote.html">Remote</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/Activatable.html#register(java.rmi.activation.ActivationDesc)">register</A></B>(<A HREF="../../../java/rmi/activation/ActivationDesc.html">ActivationDesc</A> desc)</CODE><BR> Register an object descriptor for an activatable remote object so that is can be activated on demand.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/Activatable.html#unexportObject(java.rmi.Remote, boolean)">unexportObject</A></B>(<A HREF="../../../java/rmi/Remote.html">Remote</A> obj, boolean force)</CODE><BR> Remove the remote object, obj, from the RMI runtime.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/Activatable.html#unregister(java.rmi.activation.ActivationID)">unregister</A></B>(<A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A> id)</CODE><BR> Revokes previous registration for the activation descriptor associated with <code>id</code>.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.rmi.server.RemoteServer"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.rmi.server.<A HREF="../../../java/rmi/server/RemoteServer.html">RemoteServer</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/rmi/server/RemoteServer.html#getClientHost()">getClientHost</A>, <A HREF="../../../java/rmi/server/RemoteServer.html#getLog()">getLog</A>, <A HREF="../../../java/rmi/server/RemoteServer.html#setLog(java.io.OutputStream)">setLog</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.rmi.server.RemoteObject"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.rmi.server.<A HREF="../../../java/rmi/server/RemoteObject.html">RemoteObject</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/rmi/server/RemoteObject.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/rmi/server/RemoteObject.html#getRef()">getRef</A>, <A HREF="../../../java/rmi/server/RemoteObject.html#hashCode()">hashCode</A>, <A HREF="../../../java/rmi/server/RemoteObject.html#toString()">toString</A>, <A HREF="../../../java/rmi/server/RemoteObject.html#toStub(java.rmi.Remote)">toStub</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int)"><!-- --></A><H3>Activatable</H3><PRE>protected <B>Activatable</B>(<A HREF="../../../java/lang/String.html">String</A> location, <A HREF="../../../java/rmi/MarshalledObject.html">MarshalledObject</A> data, boolean restart, int port) throws <A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A>, <A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></PRE><DL><DD>Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) . A concrete subclass of this class must call this constructor to register and export the object during <i>initial</i> construction. As a side-effect of activatable object construction, the remote object is both "registered" with the activation system and "exported" (on an anonymous port if port=0) to the RMI runtime so that it is available to accept incoming calls from clients.<DD><DL><DT><B>Parameters:</B><DD><CODE>location</CODE> - the location for classes for this object<DD><CODE>data</CODE> - the object's initialization data<DD><CODE>port</CODE> - the port on which the object is exported (an anonymous port is used if port=0)<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.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></CODE> - if object registration fails.<DD><CODE><A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></CODE> - if either of the following fails: a) registering the object with the activation system or b) exporting the object to the RMI runtime.<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="Activatable(java.lang.String, java.rmi.MarshalledObject, boolean, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)"><!-- --></A><H3>Activatable</H3><PRE>protected <B>Activatable</B>(<A HREF="../../../java/lang/String.html">String</A> location, <A HREF="../../../java/rmi/MarshalledObject.html">MarshalledObject</A> data, boolean restart, int port, <A HREF="../../../java/rmi/server/RMIClientSocketFactory.html">RMIClientSocketFactory</A> csf, <A HREF="../../../java/rmi/server/RMIServerSocketFactory.html">RMIServerSocketFactory</A> ssf) throws <A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A>, <A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></PRE><DL><DD>Constructor used to register and export the object on a specified port (an anonymous port is chosen if port=0) . <p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?