Interface GenericCardSelection

  • All Superinterfaces:
    org.calypsonet.terminal.reader.selection.spi.CardSelection

    public interface GenericCardSelection
    extends org.calypsonet.terminal.reader.selection.spi.CardSelection
    Card specific CardSelection providing means to filter cards, select applications.
    Since:
    2.0.0
    • Method Detail

      • filterByCardProtocol

        GenericCardSelection filterByCardProtocol​(java.lang.String cardProtocol)
        Requests a protocol-based filtering by defining an expected card.

        If the card protocol is set, only cards using that protocol will match the card selector.

        Parameters:
        cardProtocol - A not empty String.
        Returns:
        The current instance.
        Throws:
        java.lang.IllegalArgumentException - If the argument is null or empty.
        Since:
        2.0.0
      • filterByPowerOnData

        GenericCardSelection filterByPowerOnData​(java.lang.String powerOnDataRegex)
        Requests a power-on data-based filtering by defining a regular expression that will be applied to the card's power-on data.

        If it is set, only the cards whose power-on data is recognized by the provided regular expression will match the card selector.

        Parameters:
        powerOnDataRegex - A valid regular expression
        Returns:
        The current instance.
        Throws:
        java.lang.IllegalArgumentException - If the provided regular expression is null, empty or invalid.
        Since:
        2.0.0
      • filterByDfName

        GenericCardSelection filterByDfName​(byte[] aid)
        Requests a DF Name-based filtering by defining in a byte array the AID that will be included in the standard SELECT APPLICATION command sent to the card during the selection process.

        The provided AID can be a right truncated image of the target DF Name (see ISO 7816-4 4.2).

        Parameters:
        aid - A byte array containing 5 to 16 bytes.
        Returns:
        The current instance.
        Throws:
        java.lang.IllegalArgumentException - If the provided array is null or out of range.
        Since:
        2.0.0
      • filterByDfName

        GenericCardSelection filterByDfName​(java.lang.String aid)
        Requests a DF Name-based filtering by defining in a hexadecimal string the AID that will be included in the standard SELECT APPLICATION command sent to the card during the selection process.

        The provided AID can be a right truncated image of the target DF Name (see ISO 7816-4 4.2).

        Parameters:
        aid - A hexadecimal string representation of 5 to 16 bytes.
        Returns:
        The current instance.
        Throws:
        java.lang.IllegalArgumentException - If the provided AID is null, invalid or out of range.
        Since:
        2.0.0
      • addSuccessfulStatusWord

        GenericCardSelection addSuccessfulStatusWord​(int statusWord)
        Adds a status word to the list of those that should be considered successful for the Select Application APDU.

        Note: initially, the list contains the standard successful status word 9000h.

        Parameters:
        statusWord - A positive int ≤ FFFFh.
        Returns:
        The current instance.
        Since:
        2.0.0