com.sun.javacard.apduio
Class ClientT0Protocol

java.lang.Object
  extended by com.sun.javacard.apduio.ClientProtocol
      extended by com.sun.javacard.apduio.ClientT0Protocol

public class ClientT0Protocol
extends ClientProtocol

The ClientT0Protocol class manages the client (terminal) side of the T=0 protocol exchange with a CAD.


Field Summary
protected  boolean auto61xx
          This field maintains the current state of the auto61xx flag.
 
Fields inherited from class com.sun.javacard.apduio.ClientProtocol
cad
 
Constructor Summary
ClientT0Protocol(CadT0Client cad)
          Constructs a new ClientT0Protocol instance.
 
Method Summary
 void exchangeApdu(Apdu apdu)
          Exchange a case 1, 2s, 3s, 4s, 2e, 3e or 4e APDU with a CAD.
 boolean getAuto61xx()
          Tests if auto61xx is enabled.
 void setAuto61xx(boolean state)
          Enables or disables auto61xx.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

auto61xx

protected boolean auto61xx
This field maintains the current state of the auto61xx flag.

Constructor Detail

ClientT0Protocol

public ClientT0Protocol(CadT0Client cad)
Constructs a new ClientT0Protocol instance.

Parameters:
cad - The Cad object which all IO will be done through.
Method Detail

setAuto61xx

public void setAuto61xx(boolean state)
Enables or disables auto61xx. If auto61xx is true, the protocol code will automatically issue an ISO 7816-4 "Get Response" apdu whenever the card response with a SW1/SW2 of 61xx. If false, ISO "Get Response" APDU's will not be issued when the card returns a status of 61xx.

Parameters:
state - True enables auto61xx, false disables auto61xx.

getAuto61xx

public boolean getAuto61xx()
Tests if auto61xx is enabled.

Returns:
The state of the auto61xx flag.

exchangeApdu

public void exchangeApdu(Apdu apdu)
                  throws java.io.IOException,
                         TLP224Exception
Exchange a case 1, 2s, 3s, 4s, 2e, 3e or 4e APDU with a CAD.

Specified by:
exchangeApdu in class ClientProtocol
Parameters:
apdu - The APDU to exchange.
Throws:
TLP224Exception - if the apdu is an unsupported case.
java.io.IOException


Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.