Package org.eclipse.keyple.core.service
Interface Plugin
-
- All Known Subinterfaces:
ObservablePlugin,PoolPlugin
public interface PluginManager for one or moreReaderfrom 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>
TgetExtension(java.lang.Class<T> pluginExtensionClass)Returns theKeyplePluginExtensionthat is plugin-specific.java.lang.StringgetName()Gets the name of the plugin.ReadergetReader(java.lang.String name)Gets theReaderwhose 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 theKeyplePluginExtensionthat 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
-
-