|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.smartcard.SmartCardFactory
Provides factory functions in dealing with SmartCard objects.
SmartCard,
SmartCardReaderFactory| Method Summary | ||
|
static boolean |
addSmartCard(SmartCard newCard)
Adds the given smart card to the list of registered smart cards. |
|
static SmartCard |
chooseSmartCard()
Prompts the user to select a smart card in an attached reader. |
|
static int |
getNumSmartCards()
Returns the number of registered smart cards. |
|
static SmartCard |
getSmartCard(AnswerToReset atr)
Searches the registered list of SmartCards and returns the first implementation that indicates that it can communicate with a physical smart card possessing the given AnswerToReset, otherwise null. |
|
static SmartCard[] |
getSmartCards()
Returns the set of registered SmartCards. |
|
static SmartCardSession |
getSmartCardSession(AnswerToReset atr)
Returns a smart card communication session given an AnswerToReset. |
|
static SmartCardSession |
getSmartCardSession(SmartCard card)
Returns a smart card communication session given an SmartCard. |
|
static SmartCardSession |
getSmartCardSession(SmartCardID smartCardID)
Returns a communication session given a SmartCardID. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static boolean addSmartCard(SmartCard newCard)
This method will also register the smart card driver with the user authentication framework. If a ControlledAccessException is thrown, the card was registered with the SmartCard API, but could not be registered with the authentication framework due to restricted permissions.
newCard - The smart card driver to add.public static SmartCard chooseSmartCard() throws SmartCardException
Note: This call blocks while the selected reader has a currently open session.
SmartCard object that represents the physical smart card.SmartCardException - Thrown if an error occurs while reading the smart card.SmartCardCancelException - Thrown is the user cancels when asked to insert their smart card.SmartCardNoReaderPresentException - Thrown if no readers are registered.public static int getNumSmartCards()
public static SmartCard getSmartCard(AnswerToReset atr)
AnswerToReset, otherwise null.atr - The AnswerToReset with which to start a communication session.public static SmartCard[] getSmartCards()
SmartCards.
public static SmartCardSession getSmartCardSession(AnswerToReset atr) throws SmartCardException
AnswerToReset.
This function may prompt the user to attach the reader or insert the smart card.
atr - The AnswerToReset with which to start a communication session.SmartCardException - Thrown if an error occurs while reading the smart card.SmartCardNoCardPresentException - Thrown if none of the smart cards registed supports the atrSmartCardCancelException - Thrown if the user cancels when asked to insert their smart card or readerSmartCardNoReaderPresentException - Thrown if there are no readers registered in which to establish a connection.public static SmartCardSession getSmartCardSession(SmartCard card) throws SmartCardException
SmartCard.
This function may prompt the user to attach the reader or insert the smart card.
card - The smart card with which to start a communication session.SmartCardException - Thrown if an error occurs while reading from the smart card.SmartCardCancelException - Thrown if the user cancels when asked to insert their smart card or readerSmartCardNoReaderPresentException - Thrown if there are no readers registered in which to establish a connection.public static SmartCardSession getSmartCardSession(SmartCardID smartCardID) throws SmartCardException
SmartCardID.
This function may prompt the user to attach the reader or insert the specific smart card identified by the smart card ID.
smartCardID - The specific smart card in which to open up a session withSmartCardException - Thrown if an error occurs while reading the smart card.SmartCardCancelException - Thrown if the user cancels when asked to insert their smart card or readerSmartCardNoReaderPresentException - Thrown if there are no readers registered in which to establish a connection.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.