Interface CardTransactionManager

All Superinterfaces:
org.eclipse.keypop.reader.transaction.spi.CardTransactionManager<CardTransactionManager>

public interface CardTransactionManager extends org.eclipse.keypop.reader.transaction.spi.CardTransactionManager<CardTransactionManager>
Provides basic methods to prepare and process APDU exchange with a card.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    List<byte[]>
    Returns the list of responses corresponding to the commands executed by the last call to CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl), represented as byte arrays.
    Returns the list of responses corresponding to the commands executed by the last call to CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl), represented as hexadecimal strings.
    prepareApdu(byte[] apduCommand)
    Prepares an APDU to be transmitted the next time CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl) is invoked.
    prepareApdu(byte cla, byte ins, byte p1, byte p2, byte[] dataIn, Byte le)
    Prepares an APDU to be transmitted the next time CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl) is invoked.
    prepareApdu(String apduCommand)
    Prepares an APDU to be transmitted the next time CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl) is invoked.

    Methods inherited from interface org.eclipse.keypop.reader.transaction.spi.CardTransactionManager

    processCommands
  • Method Details

    • prepareApdu

      CardTransactionManager prepareApdu(String apduCommand)
      Prepares an APDU to be transmitted the next time CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl) is invoked.
      Parameters:
      apduCommand - A not empty hexadecimal string containing a raw APDU command.
      Returns:
      This instance.
      Since:
      1.0.0
    • prepareApdu

      CardTransactionManager prepareApdu(byte[] apduCommand)
      Prepares an APDU to be transmitted the next time CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl) is invoked.
      Parameters:
      apduCommand - A not empty byte arrays containing raw APDU commands.
      Returns:
      This instance.
      Since:
      1.0.0
    • prepareApdu

      CardTransactionManager prepareApdu(byte cla, byte ins, byte p1, byte p2, byte[] dataIn, Byte le)
      Prepares an APDU to be transmitted the next time CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl) is invoked.
      Parameters:
      cla - The class byte.
      ins - The instruction byte.
      p1 - The P1 parameter.
      p2 - The P2 parameter.
      dataIn - The APDU data, null if there is no data.
      le - The expected output length, 0 if the output length is unspecified, null if no output data is expected.
      Returns:
      This instance.
      Since:
      1.0.0
    • getResponsesAsByteArrays

      List<byte[]> getResponsesAsByteArrays()
      Returns the list of responses corresponding to the commands executed by the last call to CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl), represented as byte arrays.

      Each element in the returned list represents the response of one command, in the same order as the commands were prepared. The returned list is never null.
      This method does not alter the internal state of the manager: the list of responses remains available for later calls until CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl) is invoked again, at which point it is replaced by the new set of responses.

      Returns:
      A not null list of byte arrays representing the command responses, in the same order as the commands were sent.
      Since:
      1.0.0
    • getResponsesAsHexStrings

      List<String> getResponsesAsHexStrings()
      Returns the list of responses corresponding to the commands executed by the last call to CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl), represented as hexadecimal strings.

      Each element in the returned list represents the response of one command, in the same order as the commands were prepared. The returned list is never null.
      This method does not alter the internal state of the manager: the list of responses remains available for later calls until CardTransactionManager.processCommands(org.eclipse.keypop.reader.ChannelControl) is invoked again, at which point it is replaced by the new set of responses.

      Returns:
      A not null list of hexadecimal strings representing the command responses, in the same order as the commands were sent.
      Since:
      1.0.0