Interface CardSelector<T extends CardSelector<T>>

Type Parameters:
T - The type of the lowest level child object.
All Known Subinterfaces:
BasicCardSelector, CommonIsoCardSelector<T>, IsoCardSelector

public interface CardSelector<T extends CardSelector<T>>
Common filters used to restrict the selection process to certain cards.

These filters are all optional but can also be combined.

If no filtering is specified, any card that responds when inserted in the reader will be considered selected.

Conversely, if one or more filters have been defined, the card will not be selected if one of them rejects the card.

Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    filterByCardProtocol(String logicalProtocolName)
    Restricts the selection process to cards communicating with the reader according to a specific protocol, corresponding to the underlying technology: ISO14443-A, ISO14443-B or any other proprietary or standardized communication technology.
    filterByPowerOnData(String powerOnDataRegex)
    Restricts the selection process to cards whose power-on data provided by the reader matches a specific regular expression.
  • Method Details

    • filterByCardProtocol

      T filterByCardProtocol(String logicalProtocolName)
      Restricts the selection process to cards communicating with the reader according to a specific protocol, corresponding to the underlying technology: ISO14443-A, ISO14443-B or any other proprietary or standardized communication technology.

      The protocol is identified by its logical name.

      Prerequisites: the reader must be of type ConfigurableCardReader and the targeted card protocol(s) must be activated via the ConfigurableCardReader.activateProtocol(String, String) method and associated with the logical name used as a filter.

      Parameters:
      logicalProtocolName - The logical name of the protocol to use as filter.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If the provided logical protocol name is null or empty.
      Since:
      2.0.0
    • filterByPowerOnData

      T filterByPowerOnData(String powerOnDataRegex)
      Restricts the selection process to cards whose power-on data provided by the reader matches a specific regular expression.
      Parameters:
      powerOnDataRegex - The regular expression to use as filter.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If the provided regular expression is null, empty or invalid.
      Since:
      2.0.0