public interface RemotePluginServer
extends org.eclipse.keyple.core.service.event.ObservablePlugin
This plugin must be registered by the application installed on a Server not having local access to the smart card reader and that wishes to control the reader remotely :
SmartCardService.registerPlugin(PluginFactory) using the factory RemotePluginServerFactory.
RemotePluginServerUtils.getRemotePlugin().
SmartCardService.unregisterPlugin(String) using the plugin name.
This plugin behaves like an ObservablePlugin but exposes additional services and
contains only RemoteReaderServer and ObservableRemoteReaderServer readers.
Please note that this plugin is observable only to trigger ticketing services on the server side, but does not allow observation on the local plugin (reader insertion, etc...).
How to use it ?
ObservablePlugin.PluginObserver and using the plugin method ObservablePlugin.addObserver(PluginObserver)
PluginEvent.EventType#READER_CONNECTED.
PluginEvent.getReaderNames().
getReader(String).
ObservableRemoteReaderServer.
RemoteReaderServer.getServiceId().
RemoteReaderServer.getUserInputData(Class) and/or the initial
smart card content transmitted by the client using the method RemoteReaderServer.getInitialCardContent(Class).
terminateService(String, Object) by providing the associated reader
name and optionally a user output data.
| Modifier and Type | Method and Description |
|---|---|
RemoteReaderServer |
getReader(java.lang.String name) |
java.util.Map<java.lang.String,org.eclipse.keyple.core.service.Reader> |
getReaders() |
void |
terminateService(java.lang.String remoteReaderName,
java.lang.Object userOutputData)
Must be invoked to terminates the remote ticketing service associated to the provided remote
reader name and returns to the client the provided user output data.
|
java.util.Map<java.lang.String,org.eclipse.keyple.core.service.Reader> getReaders()
getReaders in interface org.eclipse.keyple.core.service.PluginReader but you can cast them to RemoteReaderServer if needed.RemoteReaderServer getReader(java.lang.String name)
getReader in interface org.eclipse.keyple.core.service.Pluginvoid terminateService(java.lang.String remoteReaderName,
java.lang.Object userOutputData)
remoteReaderName - The remote reader name.userOutputData - The object containing user output data.