activationgroup.html
来自「API資料大全」· HTML 代码 · 共 647 行 · 第 1/3 页
HTML
647 行
takes two arguments: the <code>ActivationGroupID</code> for the group and the <code>MarshalledObject</code> containing the group's initialization data (obtained from the <code>ActivationGroupDesc</code>. <p>If the group class name specified in the <code>ActivationGroupDesc</code> is <code>null</code>, then this method will behave as if the group descriptor contained the name of the default activation group implementation class. <p>Note that if your application creates its own custom activation group, a security manager must be set for that group. Otherwise objects cannot be activated in the group. <code>java.rmi.RMISecurityManager</code> is set by default. <p>If a security manager is already set in the group VM, this method first calls the security manager's <code>checkSetFactory</code> method. This could result in a <code>SecurityException</code>. If your application needs to set a different security manager, you must ensure that the policy file specified by the group's <code>ActivationGroupDesc</code> grants the group the necessary permissions to set a new security manager. (Note: This will be necessary if your group downloads and sets a security manager). <p>After the group is created, the <code>ActivationSystem</code> is informed that the group is active by calling the <code>activeGroup</code> method which returns the <code>ActivationMonitor</code> for the group. The application need not call <code>activeGroup</code> independently since it is taken care of by this method. <p>Once a group is created, subsequent calls to the <code>currentGroupID</code> method will return the identifier for this group until the group becomes inactive.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the activation group's identifier<DD><CODE>desc</CODE> - the activation group's descriptor<DD><CODE>incarnation</CODE> - the group's incarnation number (zero on group's initial creation)<DT><B>Returns:</B><DD>the activation group for the VM<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></CODE> - if group already exists or if error occurs during group creation<DD><CODE><A HREF="../../../java/lang/SecurityException.html">SecurityException</A></CODE> - if permission to create group is denied. (Note: The default implementation of the security manager <code>checkSetFactory</code> method requires the RuntimePermission "setFactory")<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../../java/lang/SecurityManager.html#checkSetFactory()"><CODE>SecurityManager.checkSetFactory()</CODE></A></DL></DD></DL><HR><A NAME="currentGroupID()"><!-- --></A><H3>currentGroupID</H3><PRE>public static <A HREF="../../../java/rmi/activation/ActivationGroupID.html">ActivationGroupID</A> <B>currentGroupID</B>()</PRE><DL><DD>Returns the current activation group's identifier. Returns null if no group is currently active for this VM.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the activation group's identifier<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="setSystem(java.rmi.activation.ActivationSystem)"><!-- --></A><H3>setSystem</H3><PRE>public static void <B>setSystem</B>(<A HREF="../../../java/rmi/activation/ActivationSystem.html">ActivationSystem</A> system) throws <A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></PRE><DL><DD>Set the activation system for the VM. The activation system can only be set it if no group is currently active. If the activation system is not set via this call, then the <code>getSystem</code> method attempts to obtain a reference to the <code>ActivationSystem</code> by looking up the name "java.rmi.activation.ActivationSystem" in the Activator's registry. By default, the port number used to look up the activation system is defined by <code>ActivationSystem.SYSTEM_PORT</code>. This port can be overridden by setting the property <code>java.rmi.activation.port</code>. <p>If there is a security manager, this method first calls the security manager's <code>checkSetFactory</code> method. This could result in a SecurityException.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>system</CODE> - remote reference to the <code>ActivationSystem</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></CODE> - if activation system is already set<DD><CODE><A HREF="../../../java/lang/SecurityException.html">SecurityException</A></CODE> - if permission to set the activation system is denied. (Note: The default implementation of the security manager <code>checkSetFactory</code> method requires the RuntimePermission "setFactory")<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../../java/lang/SecurityManager.html#checkSetFactory()"><CODE>SecurityManager.checkSetFactory()</CODE></A></DL></DD></DL><HR><A NAME="getSystem()"><!-- --></A><H3>getSystem</H3><PRE>public static <A HREF="../../../java/rmi/activation/ActivationSystem.html">ActivationSystem</A> <B>getSystem</B>() throws <A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></PRE><DL><DD>Returns the activation system for the VM. The activation system may be set by the <code>setSystem</code> method. If the activation system is not set via the <code>setSystem</code> method, then the <code>getSystem</code> method attempts to obtain a reference to the <code>ActivationSystem</code> by looking up the name "java.rmi.activation.ActivationSystem" in the Activator's registry. By default, the port number used to look up the activation system is defined by <code>ActivationSystem.SYSTEM_PORT</code>. This port can be overridden by setting the property <code>java.rmi.activation.port</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the activation system for the VM/group<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/activation/ActivationException.html">ActivationException</A></CODE> - if activation system cannot be obtained or is not bound (means that it is not running)<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="activeObject(java.rmi.activation.ActivationID, java.rmi.MarshalledObject)"><!-- --></A><H3>activeObject</H3><PRE>protected void <B>activeObject</B>(<A HREF="../../../java/rmi/activation/ActivationID.html">ActivationID</A> id, <A HREF="../../../java/rmi/MarshalledObject.html">MarshalledObject</A> mobj) 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>This protected method is necessary for subclasses to make the <code>activeObject</code> callback to the group's monitor. The call is simply forwarded to the group's <code>ActivationMonitor</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the object's identifier<DD><CODE>mobj</CODE> - a marshalled object containing the remote object's stub<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 an activation error occurs<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="inactiveGroup()"><!-- --></A><H3>inactiveGroup</H3><PRE>protected void <B>inactiveGroup</B>() throws <A HREF="../../../java/rmi/activation/UnknownGroupException.html">UnknownGroupException</A>, <A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></PRE><DL><DD>This protected method is necessary for subclasses to make the <code>inactiveGroup</code> callback to the group's monitor. The call is simply forwarded to the group's <code>ActivationMonitor</code>. Also, the current group for the VM is set to null.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/rmi/activation/UnknownGroupException.html">UnknownGroupException</A></CODE> - if group is not registered<DD><CODE><A HREF="../../../java/rmi/RemoteException.html">RemoteException</A></CODE> - if call informing monitor fails<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> </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/ActivationGroup.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"> <A HREF="../../../java/rmi/activation/ActivationDesc.html"><B>PREV CLASS</B></A> <A HREF="../../../java/rmi/activation/ActivationGroupDesc.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="ActivationGroup.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_java.rmi.server.RemoteObject">FIELD</A> | <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 + =
减小字号Ctrl + -
显示快捷键?