|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javacard.apduio.CadT1Dual
public class CadT1Dual
The CadT1Dual class manages two T1 connections It uses two instances of ServerT1Data to store status of the protocols Two initialize the class, use constructor with contacted socket and set contacted_atr It contactless connection is also available, set also contactless socket and contactless atr This class uses two instances of T1BlockReade to listen to incoming blocks
Field Summary | |
---|---|
protected static int |
MAX_IFS_SIZE
|
Constructor Summary | |
---|---|
CadT1Dual(java.net.Socket contactedSocket)
Create a new instance of the CadT1 class using socket representing the contacted connection. |
Method Summary | |
---|---|
void |
addCadServerListener(CadServerListener listener)
Register a new CadServerListener to be notified of state changes. |
static void |
discardIncomingGetLe(CadT1Dual cadObj,
short[] LEN,
short numBytesExpected,
short numBytesReceived)
|
byte |
getActiveInterface()
|
int |
getMaxIFSSize()
Returns the maximum IFS size supported by this CAD T=1 instance. |
byte |
getSecondaryInterfaceEvent()
|
static void |
placeDataInBuffer(CadT1Dual cadObj,
byte[] bufferINF,
short[] LEN,
short offset,
short buffSize)
|
boolean |
receiveBlock(T1Block blockFrom,
boolean switchInterface)
Reads the first T=1 Block from the terminal, setting the information inteh block passed as parameter. |
void |
setContactedATR(byte[] contacted_atr)
|
void |
setContactlessATR(byte[] contactless_atr)
|
void |
setContactlessSocket(java.net.Socket contactlessSocket)
|
boolean |
t1Abort()
|
short |
t1GetIFSC()
This method returns the T=1 maximum supported card Information Field block size (IFSC). |
short |
t1GetIFSD()
This method returns the T=1 maximum supported device Information Field block size (IFSD). |
static byte |
t1GetNAD()
This method returns the T=1 NAD byte for the last block received. |
boolean |
t1LastBlockReceived()
This method returns true if the last T=1 block in a chain has been received (i.e. |
short |
t1RcvBlock(byte[] bufferINF,
short[] LEN,
short offset,
short buffSize)
This method receives a T=1 block of data - if none are pending - or copies the data of an already- received block into the APDU buffer at the offset specified. |
short |
t1SndBlockRcvAck(byte[] buffer,
int dataOffset,
int dataLength,
boolean isLastBlock,
boolean switchInterface)
This method sends a T=1 block data in the APDU buffer specified bythe offset and length passed, and waits for acknowledgement transmission, without copying any data that might come along on that transmission. |
boolean |
t1Wait()
This method initiates a T=1 wait sequence to indicate the terminal that more time is required to process input, and thus avoid a timeout. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int MAX_IFS_SIZE
Constructor Detail |
---|
public CadT1Dual(java.net.Socket contactedSocket)
contactedSocket
- Method Detail |
---|
public void setContactedATR(byte[] contacted_atr)
contacted_atr
- public void setContactlessATR(byte[] contactless_atr)
contactless_atr
- public byte getSecondaryInterfaceEvent()
public byte getActiveInterface()
public void setContactlessSocket(java.net.Socket contactlessSocket)
contactlessSocket
- public boolean receiveBlock(T1Block blockFrom, boolean switchInterface) throws java.io.IOException, T1Exception
switchInterface
- blockFrom
- Block in which to receive the data.
T1Exception
- if a transport protocol inconsistency is detected.
java.io.IOException
- if a problem with the I/O exchange mechanism.public int getMaxIFSSize()
public boolean t1Wait() throws T1Exception
T1Exception
public boolean t1Abort() throws T1Exception
T1Exception
public boolean t1LastBlockReceived()
public void addCadServerListener(CadServerListener listener)
listener
- The listener to register.public static void discardIncomingGetLe(CadT1Dual cadObj, short[] LEN, short numBytesExpected, short numBytesReceived)
public static void placeDataInBuffer(CadT1Dual cadObj, byte[] bufferINF, short[] LEN, short offset, short buffSize)
public short t1SndBlockRcvAck(byte[] buffer, int dataOffset, int dataLength, boolean isLastBlock, boolean switchInterface) throws T1Exception
buffer
- Data bufferdataOffset
- offset to datadataLength
- length of dataisLastBlock
- last block of APDU flagswitchInterface
- OK to switch interface
T1Exception
public short t1RcvBlock(byte[] bufferINF, short[] LEN, short offset, short buffSize) throws T1Exception
bufferINF
- LEN
- offset
- buffSize
-
T1Exception
public static byte t1GetNAD()
public short t1GetIFSC()
public short t1GetIFSD()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |