Class PcscPluginFactoryBuilder.Builder

    • Method Detail

      • useContactReaderIdentificationFilter

        public PcscPluginFactoryBuilder.Builder useContactReaderIdentificationFilter​(java.lang.String contactReaderIdentificationFilter)
        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.
        Throws:
        java.lang.IllegalArgumentException - If the provided string is null or empty.
        Since:
        2.0.0
        See Also:
        useContactlessReaderIdentificationFilter(String)
      • useContactlessReaderIdentificationFilter

        public PcscPluginFactoryBuilder.Builder useContactlessReaderIdentificationFilter​(java.lang.String contactlessReaderIdentificationFilter)
        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 contactless type readers.

        Commonly used contactless readers include the "ASK LoGO" and "ACS ACR 122" models.
        Thus, an application using these readers should call this method a first time with ".*(ASK LoGO|ACS ACR122).*" as an argument.

        Parameters:
        contactlessReaderIdentificationFilter - A string a regular expression.
        Returns:
        This builder.
        Throws:
        java.lang.IllegalArgumentException - If the provided string is null or empty.
        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
      • build

        public PcscPluginFactory build()
        Returns an instance of PcscPluginFactory created from the fields set on this builder.
        Returns:
        A PcscPluginFactory
        Since:
        2.0.0