|
Provides implementation of classes and interfaces defined in com.sun.javacard.javax.smartcard.rmiclient.
This implementation depends on the OCF1.2 as the client framework.
public class JavaCardType extendsopencard.core.service.CardTypejava.lang.Object| +--opencard.core.service.CardType| +--com.sun.javacard.ocfrmiclientimpl.JavaCardType
An instance of this class is used by the OCFCardAccessorFactory to denote that the smart card currently being accessed may be Java Card technology-compliant.
JavaCardType
public class JCCardObjectFactory extendscom.sun.javacard.javax.smartcard.rmiclient.CardObjectFactoryjava.lang.Object| +--com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory| +--com.sun.javacard.ocfrmiclientimpl.JCCardObjectFactory
Processes the data returned from the card in the format defined for Java Card RMI. Object references must contain class names. Extends CardObjectFactory.
com.sun.javacard.javax.smartcard.rmiclient.CardAccessor ca)
ca - The CardAccessor of the current card session. It is passed to the Stubs/Proxies created by the Factory.
java.rmi.Remote getRemoteObject(byte[] buffer, int tagOffset)throws Exception
getRemoteObject in class CardObjectFactory
buffer - APDU buffer
tagOffset - Offset to tag
java.lang.Exception - Failed to instantiate a stub
REF_FORMAT_CLASS defined in class com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory .
getRemoteRefFormat in class CardObjectFactory
public class JCCardProxyFactory extendscom.sun.javacard.javax.smartcard.rmiclient.CardObjectFactoryjava.lang.Object| +--com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory| +--com.sun.javacard.ocfrmiclientimpl.JCCardProxyFactory
Processes the data returned from the card in the format defined for Java Card RMI. Object references must contain lists of interface names. Extends CardObjectFactory.
com.sun.javacard.javax.smartcard.rmiclient.CardAccessor ca)
ca - CardAccessor for the current session.
REF_FORMAT_INTERFACES defined in class com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory .
getRemoteRefFormat in class CardObjectFactory
java.rmi.Remote getRemoteObject(byte[] buffer, int tagOffset)throws Exception
getRemoteObject in class CardObjectFactory
buffer - APDU buffer.
tagOffset - Offset to tag.
java.lang.Exception - Thrown if the proxy instance cannot be instantiated
public class JCRemoteRefImpl implementsjava.rmi.server.RemoteRef,java.lang.reflect.InvocationHandlerjava.lang.Object| +--com.sun.javacard.ocfrmiclientimpl.JCRemoteRefImpl
java.io.Externalizable, java.lang.reflect.InvocationHandler, java.rmi.server.RemoteRef, java.io.Serializable
Represents a reference to a card object. This class is a Java Card RMI implementation of the RemoteRef interface. It is used in conjunction with Java RMIC generated stubs or dynamically generated proxies for Java Card RMI method invocations.
|
Member Summary
|
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructors
|
||||||||||||||
| |
Creates new
JCRemoteRefImpl
|
|||||||||||||
|
Methods
|
||||||||||||||
|
void
|
Deprecated and not implemented
|
|||||||||||||
|
java.lang.String
|
Unsupported operation.
|
|||||||||||||
|
java.lang.Object
|
This method is used by dynamically generated proxies.
|
|||||||||||||
|
void
|
Deprecated and not implemented
|
|||||||||||||
|
java.lang.Object
|
invoke(java.rmi.Remote remote, java.lang.reflect.Method method, java.lang.Object params, long unused)
This method is used by rmic-generated stubs.
|
|||||||||||||
|
java.rmi.server.RemoteCall
|
newCall(java.rmi.server.RemoteObject remoteObject, java.rmi.server.Operation operation, int param, long param3)
Deprecated and not implemented
|
|||||||||||||
|
void
|
Unsupported operation.
|
|||||||||||||
|
boolean
|
Compares two remote objects for being identical.
|
|||||||||||||
|
int
|
Unsupported operation.
|
|||||||||||||
|
java.lang.String
|
String representation of remote object.
|
|||||||||||||
|
void
|
Unsupported operation.
|
|||||||||||||
java.lang.String a_string, com.sun.javacard.javax.smartcard.rmiclient.CardAccessor cA, com.sun.javacard.javax.smartcard.rmiclient.CardObjectFactory cOF)
JCRemoteRefImpl
objID - 2 byte Object ID from card remote reference descriptor
a_string - Anticollision string for the class of the remote object
cA - CardAccessor
cOF - CardObjectFactory
java.lang.String getRefClass(java.io.ObjectOutput objectOutput)
getRefClass in interface RemoteRef
java.lang.Object invoke(java.rmi.Remote remote, java.lang.reflect.Method method, java.lang.Object[] params, long unused)throws IOException, RemoteException, Exception
invoke in interface RemoteRef
remote - Reference to the stub - not used.
method - java.reflect.Method object containing information about the method to be invoked.
params - Array of parameters. Primitives are wrapped.
unused - rmic-generated hash of the method. Not used.
java.io.IOException - If a communication error occurred.
java.rmi.RemoteException - If an RMI error occurred.
java.lang.Exception - Exception corresponding to the one that was thrown on the card.
remoteHashCode in interface RemoteRef
java.lang.String remoteToString()
remoteToString in interface RemoteRef
String representation of the remote object.
java.io.ObjectInput objectInput)throws IOException, ClassNotFoundException
readExternal in interface Externalizable
java.io.IOException, java.lang.ClassNotFoundException
java.io.ObjectOutput objectOutput)throws IOException
writeExternal in interface Externalizable
java.io.IOException
java.rmi.server.RemoteCall newCall(java.rmi.server.RemoteObject remoteObject, java.rmi.server.Operation[] operation, int param, long param3)throws RemoteException
newCall in interface RemoteRef
java.rmi.RemoteException
java.rmi.server.RemoteCall remoteCall)throws Exception
invoke in interface RemoteRef
java.lang.Exception
java.rmi.server.RemoteRef remoteRef)
remoteEquals in interface RemoteRef
remoteRef - RemoteRef to the other remote object.
true if corresponding remote objects are identical.
java.rmi.server.RemoteCall remoteCall)throws RemoteException
done in interface RemoteRef
java.rmi.RemoteException
java.lang.Object invoke(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] params)throws IOException, RemoteException, Throwable
invoke in interface InvocationHandler
obj - The reference to the Proxy - not used.
method - Method object containing information about the method.
params - Array of parameters for the method.
java.io.IOException - If a communication error occurred.
java.rmi.RemoteException - If an RMI error occurred.
java.lang.Throwable - Exception corresponding to the one that was thrown on the card.
public class OCFCardAccessor extendsopencard.core.service.CardServiceimplementscom.sun.javacard.javax.smartcard.rmiclient.CardAccessorjava.lang.Object| +--opencard.core.service.CardService| +--com.sun.javacard.ocfrmiclientimpl.OCFCardAccessor
com.sun.javacard.javax.smartcard.rmiclient.CardAccessor
Passes APDUs between client program and CardTerminal. Client programs usually supply their own CardAccessor extending this class and performing additional transformations and checks of the data. Implements the CardAccessor interface.
|
Member Summary
|
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructors
|
||||||||||||||
| |
Creates new OCFCardAccessor
|
|||||||||||||
|
Methods
|
||||||||||||||
|
byte[]
|
Exchanges APDU with the card.
|
|||||||||||||
|
short
|
A number identifying the current session.
|
|||||||||||||
exchangeAPDU in interface CardAccessor
sendData - The outgoing APDU
APDU
java.io.IOException
getSessionIdentifier in interface CardAccessor
public class OCFCardAccessorFactory extendsopencard.core.service.CardServiceFactoryjava.lang.Object| +--opencard.core.service.CardServiceFactory| +--com.sun.javacard.ocfrmiclientimpl.OCFCardAccessorFactory
The OCFCardAccessorFactory class creates the OCFCardAccessor instance which is used by terminal client applications to initiate and conduct a Java Card RMI based dialogue with the smart card. The methods in this class are intended to be invoked by the OCF CardServiceRegistry class. Java Card RMI Client applications should access the SmartCard class to obtain instances of OCFCardAccessor.
|
Member Summary
|
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructors
|
||||||||||||||
| |
Creates new OCFCardAccessorFactory
|
|||||||||||||
|
Methods
|
||||||||||||||
|
protected opencard.core.service.CardType
|
getCardType(opencard.core.terminal.CardID cid, opencard.core.service.CardServiceScheduler scheduler)
This method examines the
CardID object (containing the ATR returned by the Card) and checks if the card could be Java Card technology-compliant. If so, this method returns a JavaCardType object.
|
|||||||||||||
|
protected java.util.Enumeration
|
If the input parameter is a
JavaCardType object, this method returns an enumeration object with the OCFCardAccessor object listed.
|
|||||||||||||
opencard.core.service.CardType getCardType(opencard.core.terminal.CardID cid, opencard.core.service.CardServiceScheduler scheduler)
CardID object (containing the ATR returned by the Card) and checks if the card could be Java Card technology-compliant. If so, this method returns a JavaCardType object.
getCardType in class CardServiceFactory
cid - CardID received from a Card Slot.
scheduler - CardServiceScheduler that can be used to communicate with the card to determine its type.
JavaCardType if the factory can instantiate services for this card. CardType.UNSUPPORTED if the factory does not know the card.
java.util.Enumeration getClasses(opencard.core.service.CardType type)
JavaCardType object, this method returns an enumeration object with the OCFCardAccessor object listed. Subclasses of this class may add subclasses of OCFCardAccessor to this list by using the add method.
getClasses in class CardServiceFactory
type - The CardType of the smart card for which the enumeration is requested.
Enumeration of OCFCardAccessor class objects
|
Development Kit User's Guide
for the Binary Release with Cryptography Extensions Java Card Platform, Version 2.2.1 |
Copyright © 2003 Sun Microsystems, Inc. All rights reserved.