⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rmiservice.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<PRE>public static final byte <B>DEFAULT_RMI_INVOKE_INSTRUCTION</B></PRE><DL><DD>The default INS value (0x38) used for the remote method invocation command (INVOKE) in the Java Card platform RMI protocol.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javacard.framework.service.RMIService.DEFAULT_RMI_INVOKE_INSTRUCTION">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="RMIService(java.rmi.Remote)"><!-- --></A><H3>RMIService</H3><PRE>public <B>RMIService</B>(<A HREF="../../../java/rmi/Remote.html" title="interface in java.rmi">Remote</A>&nbsp;initialObject)           throws <A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></PRE><DL><DD>Creates a new <CODE>RMIService</CODE> and sets the specified remote object as the initial reference for the applet. The initial reference will be published to the client in response to the SELECT APDU command processed by this object. <p> The <CODE>RMIService</CODE> instance may create session data to manage exported remote objects for the current applet session in <CODE>CLEAR_ON_DESELECT</CODE> transient space.<P><DL><DT><B>Parameters:</B><DD><CODE>initialObject</CODE> - the remotely accessible initial object<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if the <CODE>initialObject</CODE> parameter is <code>null</code></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="setInvokeInstructionByte(byte)"><!-- --></A><H3>setInvokeInstructionByte</H3><PRE>public void <B>setInvokeInstructionByte</B>(byte&nbsp;ins)</PRE><DL><DD>Defines the instruction byte to be used in place of <CODE>DEFAULT_RMI_INVOKE_INSTRUCTION</CODE> in the Java Card platform RMI protocol for the INVOKE commands used to access the <CODE>RMIService</CODE> for remote method invocations. <p>Note:<ul> <li><em>The new instruction byte goes into effect next time this <CODE>RMIService</CODE> instance processes an applet SELECT command. The Java Card platform RMI protocol until then is unchanged.</em> </ul><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ins</CODE> - the instruction byte</DL></DD></DL><HR><A NAME="processCommand(javacard.framework.APDU)"><!-- --></A><H3>processCommand</H3><PRE>public boolean <B>processCommand</B>(<A HREF="../../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A>&nbsp;apdu)</PRE><DL><DD>Processes the command within the <CODE>APDU</CODE> object. When invoked, the APDU object should either be in <CODE>STATE_INITIAL</CODE> with the APDU buffer in the Init format or in <CODE>STATE_FULL_INCOMING</CODE> with the APDU buffer in the Input Ready format defined in <CODE>BasicService</CODE>. <p> This method first checks if the command in the <CODE>APDU</CODE> object is a Java Card platform RMI access command. The Java Card platform RMI access commands currently defined are: Applet SELECT and INVOKE. If it is not a Java Card platform RMI access command, this method does nothing and returns false. <p>If the command is a Java Card platform RMI access command, this method processes the command and generates the response to be returned to the terminal. For a detailed description of the APDU protocol used in Java Card platform RMI access commands please see the Remote Method Invocation Service chapter of <em>Runtime Environment Specification for the Java Card Platform</em>. <p>Java Card platform RMI access commands are processed as follows: <ul> <li>An applet SELECT command results in a Java Card platform RMI information structure in FCI format containing the initial reference object as the response to be returned to the terminal. <li>An INVOKE command results in the following sequence - </ul><ol> <li><em>The remote object is located. A remote object is accessible only if it was returned by this <CODE>RMIService</CODE> instance and since that time some applet instance or the other from within the applet package has been an active applet instance.</em> <li><em>The method of the object is identified</em> <li><em>Primitive input parameters are unmarshalled onto the stack. Array type input parameters are created as global arrays(See <em>Runtime Environment Specification for the Java Card Platform</em>)</em> and references to these are pushed onto the stack. <li><em>An INVOKEVIRTUAL bytecode to the remote method is simulated</em> <li> <em>Upon return from the method, method return or exception information is marshalled from the stack as the response to be returned to the terminal</em> </ol><p> After normal completion, this method returns <CODE>true</CODE> and the APDU object is in <CODE>STATE_OUTGOING</CODE> and the output response is in the APDU buffer in the Output Ready format defined in <CODE>BasicService</CODE>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javacard/framework/service/Service.html#processCommand(javacard.framework.APDU)">processCommand</A></CODE> in interface <CODE><A HREF="../../../javacard/framework/service/Service.html" title="interface in javacard.framework.service">Service</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javacard/framework/service/BasicService.html#processCommand(javacard.framework.APDU)">processCommand</A></CODE> in class <CODE><A HREF="../../../javacard/framework/service/BasicService.html" title="class in javacard.framework.service">BasicService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>apdu</CODE> - the APDU object containing the command being processed.<DT><B>Returns:</B><DD><code>true</code> if the command has been processed, <CODE>false</CODE> otherwise<DT><B>Throws:</B><DD><CODE><A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></CODE> - with the following reason codes:<ul> <li><code>ServiceException.CANNOT_ACCESS_IN_COMMAND</code> if this is a Java Card platform RMI access command and the APDU object is not in STATE_INITIAL or in STATE_FULL_INCOMING <li><code>ServiceException.REMOTE_OBJECT_NOT_EXPORTED</code> if the remote method returned a remote object which has not been exported. </ul><DD><CODE><A HREF="../../../javacard/framework/TransactionException.html" title="class in javacard.framework">TransactionException</A></CODE> - with the following reason code:<ul> <li><code>TransactionException.IN_PROGRESS</code> if this is a Java Card platform RMI INVOKE command and the remote method returned a remote object which has been exported within a transaction which is still in progress or if this is an applet SELECT command and the response information in the APDU buffer includes an initial reference object which has been exported within a transaction which is still in progress. </ul><DD><CODE><A HREF="../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if one of the following conditions is met:<ul> <li> if this is a Java Card platform RMI INVOKE command and a firewall security violation occurred while trying to simulate an INVOKEVIRTUAL bytecode on the remote object. <li> if internal storage in <code>CLEAR_ON_DESELECT</code> transient space is accessed when the currently active context is not the context of the currently selected applet. <li> if this is a Java Card platform RMI INVOKE command and the invoked remote method returns an object or throws an exception object which is not accessible in the context of the currently selected applet. </ul><DT><B>See Also:</B><DD><A HREF="../../../javacard/framework/service/CardRemoteObject.html" title="class in javacard.framework.service"><CODE>CardRemoteObject</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <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/RMIService.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-all.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 Card </b><br><font size="-1">v2.2.2</font></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javacard/framework/service/RemoteService.html" title="interface in javacard.framework.service"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javacard/framework/service/SecurityService.html" title="interface in javacard.framework.service"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?javacard/framework/service/RMIService.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="RMIService.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">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;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright &#169; 1993-2005 Sun Microsystems, Inc. 4150 Network Circle,<br>Santa Clara, CA, 95054, U.S.A.  All Rights Reserved.</i></BODY></HTML>

⌨️ 快捷键说明

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