org.simalliance.openmobileapi
Interface Reader


public interface Reader

Instances of this class represent Secure Element Readers connected to this device. These Readers can be physical devices or virtual devices. They can be removable or not. They can contain one Secure Element that can or cannot be removed.


Method Summary
 void closeSessions()
          Close all the sessions opened on this reader.
 String getName()
          Return the user-friendly name of this reader.
 SEService getSEService()
          Return the Secure Element service this reader is bound to.
 boolean isSecureElementPresent()
          Check if a Secure Element is present in this reader.
 Session openSession()
          Connects to a secure element in this reader.
 

Method Detail

getName

String getName()
Return the user-friendly name of this reader. If this reader is a SIM reader, then its name must start with the "SIM" prefix.

Returns:
the reader name, as a String.

getSEService

SEService getSEService()
Return the Secure Element service this reader is bound to.

Returns:
The SEService object.

isSecureElementPresent

boolean isSecureElementPresent()
Check if a Secure Element is present in this reader.

Returns:
true if a Secure Element is present.

openSession

Session openSession()
                    throws IOException
Connects to a secure element in this reader. This method prepares (initializes) the Secure Element for communication before the Session object is returned (i.e. powers the Secure Element by ICC ON if its not already on). There might be multiple sessions opened at the same time on the same reader. The system ensures the interleaving of APDUs between the respective sessions.

Returns:
a Session object to be used to create Channels.
Throws:
IOException - if something went wrong when communicating with the SE or the reader.

closeSessions

void closeSessions()
Close all the sessions opened on this reader. All the channels opened by all these sessions will be closed.


Copyright © 2010-2011 Inside Secure
Except as noted, this content is licensed under Apache 2.0 License.