Package com.sun.javacard.rmiclientlib
Class JCRMIConnect
- java.lang.Object
-
- com.sun.javacard.rmiclientlib.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 objectbyte[]
selectApplet(byte[] aid, byte format)
Selects an applet, requesting initial reference in the format specified by the 2nd parameter.
-
-
-
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 selectedformat
- Format of the remote references- Returns:
- R-APDU
- Throws:
java.lang.Exception
- If a problem occured
-
-