Class JCRMIConnect


  • public class JCRMIConnect
    extends java.lang.Object
    The main class of the Java Card RMI client API. Provides functionality to select a card applet and to obtain an initial reference.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected byte format
      Format of the remote references.
      static byte REF_WITH_CLASS_NAME
      Constant used as the 2nd parameter to selectApplet method.
      static byte REF_WITH_INTERFACE_NAMES
      Constant used as the 2nd parameter to selectApplet method.
      protected byte[] selectResponse
      Response to the SELECT command is stored in this field.
    • Constructor Summary

      Constructors 
      Constructor Description
      JCRMIConnect​(CardAccessor ca)
      Creates a new instance of JCRMIConnect
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.rmi.Remote getInitialReference()
      Parses the R-APDU which was returned during selecting an applet, returns a reference to an initial remote object
      byte[] selectApplet​(byte[] aid, byte format)
      Selects an applet, requesting initial reference in the format specified by the 2nd parameter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • selectResponse

        protected byte[] selectResponse
        Response to the SELECT command is stored in this field.
      • format

        protected byte format
        Format of the remote references.
      • REF_WITH_CLASS_NAME

        public static final byte REF_WITH_CLASS_NAME
        Constant used as the 2nd parameter to selectApplet method.
        See Also:
        Constant Field Values
      • REF_WITH_INTERFACE_NAMES

        public static final byte REF_WITH_INTERFACE_NAMES
        Constant used as the 2nd parameter to selectApplet method.
        See Also:
        Constant Field Values
    • Constructor Detail

      • JCRMIConnect

        public JCRMIConnect​(CardAccessor ca)
        Creates a new instance of JCRMIConnect
        Parameters:
        ca - Implementaion of a CardAccessor
    • Method Detail

      • getInitialReference

        public java.rmi.Remote getInitialReference()
                                            throws java.lang.Exception
        Parses the R-APDU which was returned during selecting an applet, returns a reference to an initial remote object
        Returns:
        Stub or proxy for the initial remote object
        Throws:
        java.lang.Exception - If a problem occured
      • selectApplet

        public byte[] selectApplet​(byte[] aid,
                                   byte format)
                            throws java.lang.Exception
        Selects an applet, requesting initial reference in the format specified by the 2nd parameter. The R-APDU is returned and also stored internally for further processing by the getInitialReference() method.
        Parameters:
        aid - AID of the applet to be selected
        format - Format of the remote references
        Returns:
        R-APDU
        Throws:
        java.lang.Exception - If a problem occured