|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.smartcard.SmartCardReaderFactory
public final class SmartCardReaderFactory
Provides factory functions to return SmartCardReader
and SmartCardReaderSession
objects.
SmartCardReader
,
SmartCardFactory
Method Summary | ||
---|---|---|
|
static boolean |
addReader(SmartCardReader newReader)
Adds the given reader to the list of registered readers. |
|
static SmartCardReader |
chooseReader()
Asks the user to select a smart card reader attached to the device. |
|
static SmartCardReader[] |
getInstalledReaders()
Returns an array of all the currently installed readers. |
|
static int |
getNumSmartCardReaders()
Returns the number of registered smart card readers. |
|
static SmartCardReaderSession |
getReaderSession(SmartCard smartCard)
Searches the registered list of SmartCardReaders and returns a communication session with the first
implementation that indicates that it can communicate with the given SmartCard . |
|
static SmartCardReaderSession[] |
getReaderSessions()
Searches the registered list of SmartCardReaders and returns communication sessions with all
implementations that indicate that it has an inserted smart card. |
|
static SmartCardReader[] |
getReaders()
Returns all the registered smart card readers. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean addReader(SmartCardReader newReader)
A reader implementation must be registered before it can be used within the SmartCard API.
newReader
- A smart card reader implementation.
public static SmartCardReader[] getReaders()
SmartCardReaders
.public static int getNumSmartCardReaders()
public static SmartCardReader[] getInstalledReaders()
SmartCardReader
s.public static SmartCardReader chooseReader() throws SmartCardException
This method returns one particular reader from the set of readers that are registered and attached to the device. If there are no readers attached to the device, the user will be prompted to attach a reader. If there are multiple readers attached to the device, the user will be prompted to select one particular reader from the list of readers.
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 reader
SmartCardNoReaderPresentException
- Thrown if no readers are registered.public static SmartCardReaderSession[] getReaderSessions() throws SmartCardException
SmartCardReaders
and returns communication sessions with all
implementations that indicate that it has an inserted smart card.
SmartCardException
- Thrown if an error occurs while reading the smart card.
SmartCardCancelException
- Thrown if the user cancels when asked to insert their smart card or reader
SmartCardNoReaderPresentException
- Thrown if there are no readers registered in which to establish a connection.public static SmartCardReaderSession getReaderSession(SmartCard smartCard) throws SmartCardException
SmartCardReaders
and returns a communication session with the first
implementation that indicates that it can communicate with the given SmartCard
.
smartCard
- The smart card used to check against the list with.
SmartCardException
- Thrown if an error occurs while reading the smart card.
SmartCardCancelException
- Thrown if the user cancels when asked to insert their smart card or reader
SmartCardNoReaderPresentException
- Thrown if there are no readers registered in which to establish a connection.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.