|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.dtt.ca.CAObject
it.dtt.ca.SmartCard
public abstract class SmartCard
This is the class used to retrieve information from the smart card currently inserted in one of the STB slots.
Constructor Summary | |
---|---|
protected |
SmartCard(Slot slot)
Create an instance of a SmartCard. |
Method Summary | |
---|---|
void |
addSmartCardListener(SmartCardListener listener)
A SmartCardListener is notified if any change occur in the smart card. |
abstract byte[] |
getATR()
Retrieves the byte array representing the Answer-to-Reset. |
abstract java.util.Date |
getExpiryDate()
Get the expiry date of this smart card. |
abstract java.util.Properties |
getMoreInfo()
Retrieves more CA related properties that cannot be retrieved with other methods (such as revisions or sw details). |
abstract java.lang.String |
getNumber()
Gets the smart card identification number for the given card. |
abstract Pin[] |
getPins()
Get all Personal Identification Numbers that are stored on the smart card. |
abstract java.lang.String |
getProvider()
Get the name of the smart card provider (normally the same as the CA provider name). |
abstract java.lang.String |
getServiceProviderName()
Retrieves the name of the service provider who delivered the card. |
abstract int |
getStatus()
Return the smart card status. |
Wallet |
getUsedWallet()
Get the wallet currently in use. |
byte[] |
getUserData()
Read the User Data field from the smart card. |
abstract java.lang.String |
getVersion()
Gets the smart card version for the given card. |
abstract Wallet[] |
getWallets()
Get the array of wallets provided by this smart card. |
void |
removeSmartCardListener(SmartCardListener listener)
Remove a previously added SmartCardListener . |
void |
setUsedWallet(Wallet wallet)
Set the wallet currently in use. |
boolean |
setUserData(byte[] userData)
Write the User Data field on the smart card. |
Methods inherited from class it.dtt.ca.CAObject |
---|
checkSession, closeSession, getParent, getSession, sessionClosed, sessionClosing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SmartCard(Slot slot)
slot
- the slot which owns this SmartCard.Method Detail |
---|
public abstract Pin[] getPins() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public abstract Wallet[] getWallets() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public void setUsedWallet(Wallet wallet) throws CardNotFoundException, SessionClosedException, AccessDeniedException, UnsupportedFeatureException
wallet
- the wallet to use from now on.
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.
AccessDeniedException
- if access is denied for security reasons.
UnsupportedFeatureException
- if the smart card does not support setting a different wallet than the default one.public Wallet getUsedWallet() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public abstract java.lang.String getNumber() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public abstract java.lang.String getVersion() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public abstract java.util.Date getExpiryDate() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public abstract java.lang.String getServiceProviderName() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public abstract java.util.Properties getMoreInfo() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public abstract byte[] getATR() throws UnsupportedFeatureException, CardNotFoundException, SessionClosedException
UnsupportedFeatureException
- if the CAS does not support ATR retrieval
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public void addSmartCardListener(SmartCardListener listener) throws SessionClosedException
SmartCardListener
is notified if any change occur in the smart card.
listener
- object listening to smart card changes.
SessionClosedException
- if the session is closed.public void removeSmartCardListener(SmartCardListener listener) throws SessionClosedException
SmartCardListener
.
listener
- object to be removed.
SessionClosedException
- if the session is closed.public abstract int getStatus() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.SmartCardEvent
public byte[] getUserData() throws UnsupportedFeatureException, CardNotFoundException, SessionClosedException
UnsupportedFeatureException
- if the Smart Card does not support user data retrieval
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public boolean setUserData(byte[] userData) throws UnsupportedFeatureException, CardNotFoundException, SessionClosedException
userData
- the data to write in the user data field of the smart card
UnsupportedFeatureException
- if the Smart Card does not support user data storage
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.public abstract java.lang.String getProvider() throws CardNotFoundException, SessionClosedException
CardNotFoundException
- if the smart card is removed or is not present in the slot.
SessionClosedException
- if the session is closed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |