OpenCard  
 
OCF, the OpenCard Framework is a standard Java framework for working with Smart Cards.  
 

com.ibm.opencard.factory
Class MFCCardServiceFactory

java.lang.Object
  |
  +--opencard.core.service.CardServiceFactory
        |
        +--com.ibm.opencard.service.IBMCardServiceFactory
              |
              +--com.ibm.opencard.factory.MFCCardServiceFactory

public class MFCCardServiceFactory
extends IBMCardServiceFactory

A factory for MFC card services (exportable). This factory can only instantiate card services which are exportable according to U.S. Export Regulations. For non-exportable MFC card services use MFCCardServiceFactoryER. This class is not available in exportable verions of OpenCard. While the first OCF design assumed a standard constructor for card services, the new card services for MFC smartcards require different constructor arguments for each card service. The responsibility of the card service factory extends to the creation of various helper objects.

Version:
$Id: MFCCardServiceFactory.java,v 1.1 1999/12/02 16:06:03 damke Exp $
See Also:
MFCCardServiceFactoryER

Constructor Summary
MFCCardServiceFactory()
          Default constructor.
 
Method Summary
protected  CardType getCardType(CardID cid, CardServiceScheduler scheduler)
          Indicate whether this CardServiceFactory "knows" the smart card OS and/or installed card applications and might be able to instantiate CardServices for it.
protected  java.util.Enumeration getClasses(CardType type)
          Return an enumeration of known CardService classes.
 
Methods inherited from class com.ibm.opencard.service.IBMCardServiceFactory
determineCardOS, enumerateClasses, newCardServiceInstance, normalizedCOSValue
 
Methods inherited from class opencard.core.service.CardServiceFactory
getCardServiceInstance, getClassFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MFCCardServiceFactory

public MFCCardServiceFactory()
Default constructor.
Method Detail

getCardType

protected CardType getCardType(CardID cid,
                               CardServiceScheduler scheduler)
Indicate whether this CardServiceFactory "knows" the smart card OS and/or installed card applications and might be able to instantiate CardServices for it.

This method replaces the former knows() method.

Should return a CardType that contains enough information to answer the getClassFor() method.

The factory can inspect the card (communicate with the card) using the provided CardServiceScheduler if the CardID information is insufficient to classify the card.

Parameters:
cid - A CardID received from a Slot.
scheduler - A CardServiceScheduler that can be used to communicate with the card to determine its type.
Returns:
A valid CardType if the factory can instantiate services for this card. CardType.UNSUPPORTED if the factory does not know the card.
Overrides:
getCardType in class CardServiceFactory
See Also:
##getClassFor

getClasses

protected java.util.Enumeration getClasses(CardType type)
Return an enumeration of known CardService classes.
Parameters:
type - The CardType for which to enumerate.
Returns:
An Enumeration of class objects.
Overrides:
getClasses in class CardServiceFactory