|
JMRTD 0.4.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.scuba.smartcards.CardService
public abstract class CardService
Default abstract service. Provides some functionality for observing apdu events.
| Field Summary | |
|---|---|
protected boolean |
listeners
|
protected static int |
SESSION_STARTED_STATE
|
protected static int |
SESSION_STOPPED_STATE
|
protected int |
state
|
| Constructor Summary | |
|---|---|
CardService()
Creates a new service. |
|
| Method Summary | |
|---|---|
void |
addAPDUListener(APDUListener l)
Adds a listener. |
abstract void |
close()
Closes the session with the card. |
abstract boolean |
isOpen()
|
protected void |
notifyExchangedAPDU(CommandAPDU capdu,
ResponseAPDU rapdu)
Notifies listeners about APDU event. |
abstract void |
open()
Opens a session with the card. |
void |
removeAPDUListener(APDUListener l)
Removes the listener l, if present. |
void |
setListenersState(boolean state)
|
abstract ResponseAPDU |
transmit(CommandAPDU apdu)
Sends and apdu to the card. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int SESSION_STOPPED_STATE
protected static final int SESSION_STARTED_STATE
protected int state
protected boolean listeners
| Constructor Detail |
|---|
public CardService()
| Method Detail |
|---|
public void addAPDUListener(APDUListener l)
l - the listener to addpublic void removeAPDUListener(APDUListener l)
l, if present.
l - the listener to remove
public abstract void open()
throws CardServiceException
CardServiceExceptionpublic abstract boolean isOpen()
public abstract ResponseAPDU transmit(CommandAPDU apdu)
throws CardServiceException
apdu - the command apdu to send.
CardServiceException - - if the card operation failedpublic abstract void close()
protected void notifyExchangedAPDU(CommandAPDU capdu,
ResponseAPDU rapdu)
capdu - APDU eventpublic void setListenersState(boolean state)
|
JMRTD 0.4.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||