Interface Plugin

  • All Known Subinterfaces:
    ObservablePlugin, PoolPlugin

    public interface Plugin
    Manager for one or more Reader from the same family.

    Provides the means to get the plugin name, enumerate and retrieve the readers.

    Since:
    2.0.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T extends org.eclipse.keyple.core.common.KeyplePluginExtension>
      T
      getExtension​(java.lang.Class<T> pluginExtensionClass)
      Returns the KeyplePluginExtension that is plugin-specific.
      java.lang.String getName()
      Gets the name of the plugin.
      Reader getReader​(java.lang.String name)
      Gets the Reader whose name is provided.
      java.util.Set<java.lang.String> getReaderNames()
      Gets the names of all connected readers.
      java.util.Set<Reader> getReaders()
      Gets all connected readers.
    • Method Detail

      • getName

        java.lang.String getName()
        Gets the name of the plugin.
        Returns:
        A not empty string.
        Since:
        2.0.0
      • getExtension

        <T extends org.eclipse.keyple.core.common.KeyplePluginExtension> T getExtension​(java.lang.Class<T> pluginExtensionClass)
        Returns the KeyplePluginExtension that is plugin-specific.

        Note: the provided argument is used at compile time to check the type consistency.

        Type Parameters:
        T - The type of the plugin extension.
        Parameters:
        pluginExtensionClass - The specific class of the plugin.
        Returns:
        A not null reference.
        Since:
        2.0.0
      • getReaderNames

        java.util.Set<java.lang.String> getReaderNames()
        Gets the names of all connected readers.
        Returns:
        An empty set if there's no reader connected.
        Throws:
        java.lang.IllegalStateException - if plugin is no longer registered.
        Since:
        2.0.0
      • getReaders

        java.util.Set<Reader> getReaders()
        Gets all connected readers.
        Returns:
        An empty Set if there's no reader connected.
        Throws:
        java.lang.IllegalStateException - if the plugin is no longer registered.
        Since:
        2.0.0
      • getReader

        Reader getReader​(java.lang.String name)
        Gets the Reader whose name is provided.
        Parameters:
        name - The name of the reader.
        Returns:
        Null if the reader has not been found.
        Throws:
        java.lang.IllegalStateException - if the plugin is no longer registered.
        Since:
        2.0.0