activationgroup.html

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

HTML
647
字号
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current activation group's identifier.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/rmi/activation/ActivationSystem.html">ActivationSystem</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationGroup.html#getSystem()">getSystem</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the activation system for the VM.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationGroup.html#inactiveGroup()">inactiveGroup</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This protected method is necessary for subclasses to make the <code>inactiveGroup</code> callback to the group's monitor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationGroup.html#inactiveObject(java.rmi.activation.ActivationID)">inactiveObject</A></B>(<A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A>&nbsp;id)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The group's <code>inactiveObject</code> method is called indirectly via a call to the <code>Activatable.inactive</code> method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationGroup.html#setSystem(java.rmi.activation.ActivationSystem)">setSystem</A></B>(<A HREF="../../../java/rmi/activation/ActivationSystem.html">ActivationSystem</A>&nbsp;system)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the activation system for the VM.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.rmi.server.UnicastRemoteObject"><!-- --></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/UnicastRemoteObject.html">UnicastRemoteObject</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/rmi/server/UnicastRemoteObject.html#clone()">clone</A>, <A HREF="../../../java/rmi/server/UnicastRemoteObject.html#exportObject(java.rmi.Remote)">exportObject</A>, <A HREF="../../../java/rmi/server/UnicastRemoteObject.html#exportObject(java.rmi.Remote, int)">exportObject</A>, <A HREF="../../../java/rmi/server/UnicastRemoteObject.html#exportObject(java.rmi.Remote, int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)">exportObject</A>, <A HREF="../../../java/rmi/server/UnicastRemoteObject.html#unexportObject(java.rmi.Remote, boolean)">unexportObject</A></CODE></TD></TR></TABLE>&nbsp;<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>&nbsp;<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>&nbsp;<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#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>&nbsp;<A NAME="methods_inherited_from_class_java.rmi.activation.ActivationInstantiator"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.rmi.activation.<A HREF="../../../java/rmi/activation/ActivationInstantiator.html">ActivationInstantiator</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/rmi/activation/ActivationInstantiator.html#newInstance(java.rmi.activation.ActivationID, java.rmi.activation.ActivationDesc)">newInstance</A></CODE></TD></TR></TABLE>&nbsp;<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="ActivationGroup(java.rmi.activation.ActivationGroupID)"><!-- --></A><H3>ActivationGroup</H3><PRE>protected <B>ActivationGroup</B>(<A HREF="../../../java/rmi/activation/ActivationGroupID.html">ActivationGroupID</A>&nbsp;groupID)                   throws <A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></PRE><DL><DD>Constructs and exports an activation group as a UnicastRemoteObject so that a client can invoke its newInstance method.<DD><DL><DT><B>Parameters:</B><DD><CODE>groupID</CODE> - the group's identifier<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></CODE> - if group could not be exported<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><!-- ============ 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="inactiveObject(java.rmi.activation.ActivationID)"><!-- --></A><H3>inactiveObject</H3><PRE>public boolean <B>inactiveObject</B>(<A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A>&nbsp;id)                       throws <A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A>,                              <A HREF="../../../java/rmi/activation/UnknownObjectException.html">UnknownObjectException</A>,                              <A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></PRE><DL><DD>The group's <code>inactiveObject</code> method is called indirectly via a call to the <code>Activatable.inactive</code> method. A remote object implementation must call <code>Activatable</code>'s <code>inactive</code> method when that object deactivates (the object deems that it is no longer active). If the object does not call <code>Activatable.inactive</code> when it deactivates, the object will never be garbage collected since the group keeps strong references to the objects it creates. <p> <p>The group's <code>inactiveObject</code> method unexports the remote object from the RMI runtime so that the object can no longer receive incoming RMI calls. An object will only be unexported if the object has no pending or executing calls. The subclass of <code>ActivationGroup</code> must override this method and unexport the object. <p> <p>After removing the object from the RMI runtime, the group must inform its <code>ActivationMonitor</code> (via the monitor's <code>inactiveObject</code> method) that the remote object is not currently active so that the remote object will be re-activated by the activator upon a subsequent activation request.<p> <p>This method simply informs the group's monitor that the object is inactive.  It is up to the concrete subclass of ActivationGroup to fulfill the additional requirement of unexporting the object. <p><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the object's activation identifier<DT><B>Returns:</B><DD>true if the object was successfully deactivated; otherwise         returns false.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/activation/UnknownObjectException.html">UnknownObjectException</A></CODE> - if object is unknown (may already be inactive)<DD><CODE><A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></CODE> - if call informing monitor fails<DD><CODE><A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></CODE> - if group is inactive<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="activeObject(java.rmi.activation.ActivationID, java.rmi.Remote)"><!-- --></A><H3>activeObject</H3><PRE>public abstract void <B>activeObject</B>(<A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A>&nbsp;id,                                  <A HREF="../../../java/rmi/Remote.html">Remote</A>&nbsp;obj)                           throws <A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A>,                                  <A HREF="../../../java/rmi/activation/UnknownObjectException.html">UnknownObjectException</A>,                                  <A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></PRE><DL><DD>The group's <code>activeObject</code> method is called when an object is exported (either by <code>Activatable</code> object construction or an explicit call to <code>Activatable.exportObject</code>. The group must inform its <code>ActivationMonitor</code> that the object is active (via the monitor's <code>activeObject</code> method) if the group hasn't already done so.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the object's identifier<DD><CODE>obj</CODE> - the remote object implementation<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/activation/UnknownObjectException.html">UnknownObjectException</A></CODE> - if object is not registered<DD><CODE><A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></CODE> - if call informing monitor fails<DD><CODE><A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></CODE> - if group is inactive<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="createGroup(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc, long)"><!-- --></A><H3>createGroup</H3><PRE>public static <A HREF="../../../java/rmi/activation/ActivationGroup.html">ActivationGroup</A> <B>createGroup</B>(<A HREF="../../../java/rmi/activation/ActivationGroupID.html">ActivationGroupID</A>&nbsp;id,                                          <A HREF="../../../java/rmi/activation/ActivationGroupDesc.html">ActivationGroupDesc</A>&nbsp;desc,                                          long&nbsp;incarnation)                                   throws <A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></PRE><DL><DD>Create and set the activation group for the current VM.  The activation group can only be set if it is not currently set. An activation group is set using the <code>createGroup</code> method when the <code>Activator</code> initiates the re-creation of an activation group in order to carry out incoming <code>activate</code> requests. A group must first be registered with the <code>ActivationSystem</code> before it can be created via this method. <p>The group class specified by the <code>ActivationGroupDesc</code> must be a concrete subclass of <code>ActivationGroup</code> and have a public constructor that

⌨️ 快捷键说明

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