Class PcscPluginFactoryBuilder.Builder

    • Field Detail

      • DEFAULT_CONTACTLESS_READER_FILTER

        public static final java.lang.String DEFAULT_CONTACTLESS_READER_FILTER
        See Also:
        Constant Field Values
    • Method Detail

      • useContactReaderIdentificationFilter

        @Deprecated
        public PcscPluginFactoryBuilder.Builder useContactReaderIdentificationFilter​(java.lang.String contactReaderIdentificationFilter)
        Deprecated.
        Useless method that will be removed soon, see useContactlessReaderIdentificationFilter(String)
        Sets a filter based on regular expressions to make the plugin able to identify a contact reader from its name.

        Readers whose names match the provided regular expression will be considered contact type readers.

        For example, the string ".*less.*" could identify all readers having "less" in their name as contactless readers.

        Names are not always as explicit, so it is sometimes better to test the brand and model.
        Commonly used contact readers include "Cherry TC" or "Identive".
        Thus, an application using these readers should call this method with ".*(Cherry TC|Identive).*" as an argument.

        Parameters:
        contactReaderIdentificationFilter - A string a regular expression.
        Returns:
        This builder.
        Since:
        2.0.0
      • useContactlessReaderIdentificationFilter

        public PcscPluginFactoryBuilder.Builder useContactlessReaderIdentificationFilter​(java.lang.String contactlessReaderIdentificationFilter)
        Overwrites the default filter with the provided filter based on regular expressions to make the plugin able to identify a contact reader from its name.

        Readers whose names match the provided regular expression will be considered contactless type readers.

        The default value is "(?i).*(contactless|ask logo|acs acr122).*"

        Parameters:
        contactlessReaderIdentificationFilter - A regular expression.
        Returns:
        This builder.
        Throws:
        java.lang.IllegalArgumentException - If the provided string is null, empty or invalid.
        Since:
        2.0.0
        See Also:
        useContactReaderIdentificationFilter(String)
      • updateProtocolIdentificationRule

        public PcscPluginFactoryBuilder.Builder updateProtocolIdentificationRule​(java.lang.String readerProtocolName,
                                                                                 java.lang.String protocolRule)
        Updates a protocol identification rule.

        A protocol rule is a regular expression contained in a String.

        • If a rule already exists for the provided protocol, it is replaced.
        • If no rule exists for the provided protocol, it is added.
        • If the rule is null, the protocol is disabled.
        Parameters:
        readerProtocolName - A not empty String.
        protocolRule - null to disable the protocol.
        Returns:
        This builder.
        Throws:
        java.lang.IllegalArgumentException - If one of the argument is null or empty
        Since:
        2.0.0