|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopencard.core.terminal.SlotChannel
public final class SlotChannel
A SlotChannel serves a dual purpose: It is a gate object providing access to the smart card and, in addition, is used to send and receive APDUs and generally interact with the card.
Slot
Constructor Summary | |
---|---|
SlotChannel(CardTerminal terminal,
int slotID,
java.lang.Object lockHandle)
Instantiate a SlotChannel. |
Method Summary | |
---|---|
void |
close()
Close this SlotChannel. |
APDUTracer |
getAPDUTracer()
Return the APDU tracer for this slot channel |
CardID |
getCardID()
Return the CardID object of the inserted smart card. |
CardTerminal |
getCardTerminal()
Return the CardTerminal. |
java.lang.Object |
getLockHandle()
Return the slot owner. |
java.lang.Object |
getScheduler()
|
Slot |
getSlot()
Deprecated. use getSlotNumber(), getCardTerminal() instead |
int |
getSlotNumber()
Return the slot number of the associated slot. |
boolean |
isOpen()
Check whether this SlotChannel is open. |
CardID |
reset()
Reset the smart card attached to this SlotChannel's slot. |
CardID |
reset(boolean warm)
Reset the smart card attached to this SlotChannel's slot. |
CardID |
reset(int ms)
Deprecated. |
ResponseAPDU |
sendAPDU(CommandAPDU capdu)
Send a CommandAPDU on this SlotChannel. |
ResponseAPDU |
sendAPDU(CommandAPDU capdu,
int ms)
Deprecated. |
void |
setAPDUTracer(APDUTracer tracer)
Set a tracer to log all command and response APDUs send over this slot channel |
void |
setScheduler(java.lang.Object scheduler)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SlotChannel(CardTerminal terminal, int slotID, java.lang.Object lockHandle)
terminal
- The terminal to which the slot belongs.slotID
- The number of the slot to which this
SlotChannel is attached.lockHandle
- the owner who holds a lock on the slotMethod Detail |
---|
public java.lang.Object getScheduler()
public void setScheduler(java.lang.Object scheduler)
public ResponseAPDU sendAPDU(CommandAPDU capdu) throws CardTerminalException
capdu
- The CommandAPDU to send.
CardTerminalException
- Thrown when terminal.sendAPDU failed.public ResponseAPDU sendAPDU(CommandAPDU capdu, int ms) throws CardTerminalException
CardTerminalException
public Slot getSlot()
public int getSlotNumber()
public CardTerminal getCardTerminal()
public java.lang.Object getLockHandle()
public CardID reset(int ms) throws CardTerminalException
CardTerminalException
public CardID reset(boolean warm) throws CardTerminalException
warm
- Perform warm reset if true
CardTerminalException
- Thrown when terminal.reset failed.public CardID reset() throws CardTerminalException
CardTerminalException
- Thrown when terminal.reset failed.public boolean isOpen()
public void close() throws CardTerminalException
CardTerminalException
- Thrown when terminal.closeSlotChannel failed.public CardID getCardID() throws CardTerminalException
CardTerminalException
- Thrown when terminal.getCardID failed.public java.lang.String toString()
toString
in class java.lang.Object
public void setAPDUTracer(APDUTracer tracer)
tracer
- the APDU tracerpublic APDUTracer getAPDUTracer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |