|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface Session
Instances of this class represent a connection session to one of the secure elements available on the device. These objects can be used to get a communication channel with an application in the secure element. This channel can be the basic channel or a logical channel.
| Method Summary | |
|---|---|
void |
close()
Close the connection with the secure element. |
void |
closeChannels()
Close any channel opened on this session |
byte[] |
getATR()
Get the Answer to Reset of this Secure Element. |
Reader |
getReader()
Get the reader that provides this session |
boolean |
isClosed()
Tells if this session is closed |
Channel |
openBasicChannel(byte[] aid)
Get an access to the basic channel, as defined in the ISO7816-4 specification (the one that has number 0). |
Channel |
openLogicalChannel(byte[] aid)
Open a logical channel with the secure element, selecting the application represented by the given AID. |
| Method Detail |
|---|
Reader getReader()
byte[] getATR()
void close()
boolean isClosed()
void closeChannels()
Channel openBasicChannel(byte[] aid)
throws IOException,
IllegalStateException,
IllegalArgumentException,
SecurityException
aid - the AID of the application to be selected on this channel, as a
byte array, or null if no application is to be selected
IOException - if there is a communication problem to the reader or the secure
element (e.g. if the AID is not available).
IllegalStateException - if the secure element session is used after being closed.
IllegalArgumentException - if the AID's length is not within 5 to 16(inclusive).
SecurityException - if the calling application cannot be granted access to this AID
or the default application on this session.
Channel openLogicalChannel(byte[] aid)
throws IOException,
IllegalStateException,
IllegalArgumentException,
SecurityException
aid - the AID of the application to be selected on this channel, as a
byte array.
IOException - if there is a communication problem to the reader or the secure
element (e.g. if the AID is not available).
IllegalStateException - if the secure element session is used after being closed.
IllegalArgumentException - if the AID's length is not within 5 to 16(inclusive).
SecurityException - if the calling application cannot be granted access to this AID
or the default application on this session.
|
Copyright © 2010-2011 Inside Secure |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||