|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.jc.JCTerminal
com.ibm.jc.terminal.OCFJCTerminal
| Field Summary |
| Fields inherited from class com.ibm.jc.JCTerminal |
CARD_PRESENT, ERROR, NOT_CONNECTED, PROTOCOL_T0, PROTOCOL_T1, PROTOCOL_TCL, SLOT_EMPTY |
| Constructor Summary | |
OCFJCTerminal()
Construct a new terminal object. |
|
| Method Summary | |
void |
close()
Close connection to card terminal. |
static java.lang.String[] |
getAvailableTerminals()
Get a list of the available terminals as defined in the opencard.properties configuration file. |
int |
getState()
Return the state of the terminal. |
JCTerminal |
init(java.lang.String terminalName)
Initialize the card terminal. |
void |
open()
Open the card terminal. |
byte[] |
send(int nad,
byte[] toSend,
int offset,
int len)
Send data to the card terminal. |
protected void |
smartCardInserted(CardTerminalEvent pCardTerminalEvent)
Event method called by OCF when a card is inserted. |
protected void |
smartCardRemoved(CardTerminalEvent pCardTerminalEvent)
Event method called by OCF when a card is removed. |
java.lang.String |
toString()
Return the terminal description. |
byte[] |
waitForCard(int time)
Wait for insertion of a card and return ATR (answer to reset). |
| Methods inherited from class com.ibm.jc.JCTerminal |
filterFor, filterFor, generateParityError, getErrorMessage, getInstance, init, ioctl, pps, send, sendraw |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public OCFJCTerminal()
| Method Detail |
public void close()
close in class JCTerminalJCTerminal.open()
public static java.lang.String[] getAvailableTerminals()
throws JCException
A - JCException is thrown if OCF cannot
initialize (eg. no terminal connected or no config file).
JCExceptionpublic int getState()
getState in class JCTerminal
public JCTerminal init(java.lang.String terminalName)
throws JCException
terminalName - The name of the terminal to use as defined
in the opencard.properties file.
Available terminals can be queried using
the static getAvailableTerminals() method.
If null is passed, the default/first terminal
is used.
A - JCException is thrown if OCF cannot initialize
(eg. no terminal connected or no config file).
JCExceptionpublic void open()
open in class JCTerminal
public byte[] send(int nad,
byte[] toSend,
int offset,
int len)
throws JCException
send in class JCTerminalnad - Node address to which data is being sent
Currently ignored by implementation!!!toSend - Byte array containing data to be sendoffset - Offset starting at which data sending is to beginlen - Number of bytes to be transmitted
A - JCException is thrown if communication fails
or parameters are wrong.
JCException - if communication failed or if some parameters are wrongcom.ibm.jc.JCard.sendprotected void smartCardInserted(CardTerminalEvent pCardTerminalEvent)
pCardTerminalEvent - The event object.protected void smartCardRemoved(CardTerminalEvent pCardTerminalEvent)
pCardTerminalEvent - The event object.public java.lang.String toString()
toString in class JCTerminal
public byte[] waitForCard(int time)
throws JCException
waitForCard in class JCTerminaltime - The time (in milliseconds) for which the call blocks.
JCException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||