Interface PoolPlugin

  • All Superinterfaces:
    Plugin

    public interface PoolPlugin
    extends Plugin
    Plugin able to handle the access to an undefined number of CardReader.

    It is typically used to define a plugin built on top of an HSM interface that can allocate a large number of virtual reader slots.

    A PoolPlugin can't be observable.

    Since:
    2.0.0
    • Method Detail

      • getReaderGroupReferences

        java.util.SortedSet<java.lang.String> getReaderGroupReferences()
        Gets a list of group references that identify a group of readers.

        A group reference can represent a family of readers that all have the same characteristics (for example, containing a SAM with identical key sets).

        Returns:
        a list of String
        Since:
        2.0.0
      • allocateReader

        Reader allocateReader​(java.lang.String readerGroupReference)
        Gets a CardReader and makes it exclusive to the caller until the releaseReader(CardReader) method is invoked.

        The allocated reader belongs to the group targeted with provided reference.

        Parameters:
        readerGroupReference - The reference of the group to which the reader belongs (may be null depending on the implementation made).
        Returns:
        A not null reference.
        Throws:
        KeyplePluginException - If the allocation failed due to lack of available reader.
        Since:
        2.0.0
      • releaseReader

        void releaseReader​(org.calypsonet.terminal.reader.CardReader reader)
        Releases a Reader previously allocated with allocateReader.

        This method must be invoked as soon as the reader is no longer needed by the caller of allocateReader in order to free the resource.

        Parameters:
        reader - The Reader to be released.
        Since:
        2.0.0