|
||||||||||
| 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.NativeJCTerminal
Card terminal based on vendor specific DLLs. This terminal class calls into "jct.dll" provided with this package which in turn loads vendor specific DLLs providing actual access to physical terminals. The vendor specific DLLs may implement different APIs. Jct.dll is capabable of handling some of these APIs. For setting up a NativeJCTerminal the caller has to specify the name of a DLL and the API it is implementing.
| Field Summary | |
static int |
CP8_API
API #7: Loaded DLL must implement Bull CP8 API |
static int |
CT_UTIMACO_API
API #9: Loaded DLL must implement Utimaco CT-API |
static int |
CT11_CHERRY_API
API #2: Loaded DLL must implement CT-API 1.1 as defined for Cherry keyboards. |
static int |
CT11_IBM_API
API #3: Loaded DLL must implement CT-API 1.1 as defined for IBM terminals. |
static int |
CT11_KAAN_API
API #6: Loaded DLL must implement CT-API 1.1 as defined for Kobil Kaan terminals. |
static int |
CT11_SWAPSMART_API
API #1: Loaded DLL must implement CT-API 1.1 as defined for SwapSmart PCMCIA terminal. |
static int |
CT11_TOWITOKO_API
API #5: Loaded DLL must implement CT-API 1.1 as defined for Towitoko terminals. |
static int |
IBM4758_API
API #8: Loaded DLL must implement IBM 4758 API |
static int |
IKEY_API
API #11: Loaded DLL must implement USB iKey Interface |
static int |
PCSC_API
API #4: Loaded DLL must implement PC/SC API. |
static int |
TCL_API
API #10: Loaded DLL must implement T=CL (V 3.0) contactless readers |
static int |
XAC_API
API #0: Loaded DLL must implement proprietary interface of XAC Automation Corp. |
| Fields inherited from class com.ibm.jc.JCTerminal |
CARD_PRESENT, ERROR, NOT_CONNECTED, PROTOCOL_T0, PROTOCOL_T1, PROTOCOL_TCL, SLOT_EMPTY |
| Constructor Summary | |
NativeJCTerminal()
|
|
NativeJCTerminal(java.lang.String dll,
int api)
Create a Java terminal class using the given DLL which implements the specified API. |
|
| Method Summary | |
void |
close()
Close connection to card terminal. |
void |
finalize()
|
void |
generateParityError(int n)
Schedule generation of parity error for the n-th character to be transmitted (in or out). |
java.lang.String |
getErrorMessage()
|
int |
getState()
|
JCTerminal |
init(java.lang.Object param)
Initialize terminal. |
byte[] |
ioctl(int req,
byte[] param,
int off,
int len)
Perform terminal-dependent action... |
void |
open()
Open the card terminal. |
void |
pps(int protocol,
int parameter)
Select protocol and parameters for subsequent communication (can only be applied immediately after card reset). |
byte[] |
send(int nad,
byte[] toSend,
int offset,
int len)
Send data to the card (using the negotiated protocol). |
byte[] |
sendraw(byte[] data,
int off,
int len,
int timeout)
Send data to the card (using *no* protocol, raw bytes are transmitted without modification). |
java.lang.String |
toString()
|
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, getInstance, send |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int XAC_API
public static final int CT11_SWAPSMART_API
public static final int CT11_CHERRY_API
public static final int CT11_IBM_API
public static final int PCSC_API
public static final int CT11_TOWITOKO_API
public static final int CT11_KAAN_API
public static final int CP8_API
public static final int IBM4758_API
public static final int CT_UTIMACO_API
public static final int TCL_API
public static final int IKEY_API
| Constructor Detail |
public NativeJCTerminal()
public NativeJCTerminal(java.lang.String dll,
int api)
dll - the name of the DLL. The DLL must be found via platform
dependent search mechanism (in Win32 PATH environment
variable).api - the number of the API the DLL implements (see constants).| Method Detail |
public void finalize()
public JCTerminal init(java.lang.Object param)
JCTerminal
init in class JCTerminalparam - some parameter initializing the terminal. The possible types and
meanings depend on the specific terminal. It is expected that all
terminals support at least some String based initialization.
public java.lang.String toString()
toString in class JCTerminalpublic java.lang.String getErrorMessage()
getErrorMessage in class JCTerminalpublic void open()
JCTerminal
open in class JCTerminalpublic void close()
JCTerminal
close in class JCTerminalJCTerminal.open()public byte[] waitForCard(int time)
JCTerminalNote, not all terminals support the time parameter. It is only guaranteed that the call will not block longer than the specified time. It might return immediately with null.
waitForCard in class JCTerminaltime - the calls blocks for specified milliseconds.
public int getState()
getState in class JCTerminal
public byte[] send(int nad,
byte[] toSend,
int offset,
int len)
JCTerminalJCard.send() should be used)
send in class JCTerminalnad - node address to which data is being sent (high nibble = destination
address, low = source address). Address values: 2=host, 1=terminal, 0=card.
A value of 0 means from host to card.toSend - byte array containing APDU data to be sentoffset - offset starting at which APDU data sending is to beginlen - number of bytes to be transmitted
com.ibm.jc.JCard.send
public byte[] sendraw(byte[] data,
int off,
int len,
int timeout)
JCTerminal
sendraw in class JCTerminaldata - byte array containing raw data to be sentoff - offset starting at which raw data sending is to beginlen - number of bytes to be transmittedtimeout - time to wait for response data (time unit is device-dependent, ignored by some readers)
public void pps(int protocol,
int parameter)
JCTerminal
pps in class JCTerminalprotocol - protocol type to be used (PROTOCOL_T0 or PROTOCOL_T1 in contact mode, PROTOCOL_TCL in contact-less mode)parameter - baud ratePROTOCOL_T0,
PROTOCOL_T1,
PROTOCOL_TCL,
sendpublic void generateParityError(int n)
JCTerminal
generateParityError in class JCTerminaln - index of character to manipulate (0-based)
public byte[] ioctl(int req,
byte[] param,
int off,
int len)
JCTerminal
ioctl in class JCTerminalreq - request codeparam - array holding request parameters (may be null)off - offset to parameterslen - length of parameters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||