Interface LocalServiceSpi
-
public interface LocalServiceSpi
Distributed local service extension able to communicate with a distributed remote plugin extension.- Since:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
connect(LocalServiceApi localServiceApi)
Connects the associated Keyple CoreLocalServiceApi
API.int
exchangeApiLevel(int coreApiLevel)
Exchanges the JSON API levels between the Keyple Core and Distributed layers.java.lang.String
getName()
Gets the name of the distributed local service extension.void
onPluginEvent(java.lang.String readerName, java.lang.String jsonData)
Invoked when a plugin event occurs in order to be forwarded to the remote plugin.void
onReaderEvent(java.lang.String readerName, java.lang.String jsonData)
Invoked when a reader event occurs in order to be forwarded to the remote plugin.
-
-
-
Method Detail
-
connect
void connect(LocalServiceApi localServiceApi)
Connects the associated Keyple CoreLocalServiceApi
API.- Parameters:
localServiceApi
- The API to connect.- Since:
- 2.0.0
-
getName
java.lang.String getName()
Gets the name of the distributed local service extension.- Returns:
- A not empty string.
- Since:
- 2.0.0
-
exchangeApiLevel
int exchangeApiLevel(int coreApiLevel)
Exchanges the JSON API levels between the Keyple Core and Distributed layers.- Parameters:
coreApiLevel
- The JSON API level of the Core layer.- Returns:
- The JSON API level of the Distributed layer.
- Since:
- 2.1.0
-
onPluginEvent
void onPluginEvent(java.lang.String readerName, java.lang.String jsonData)
Invoked when a plugin event occurs in order to be forwarded to the remote plugin.This method will only be invoked if the start reader detection functional method has been previously invoked in order to activate the observation of all local plugins.
- Parameters:
readerName
- The name of the associated local reader.jsonData
- The plugin event as a JSON data to forward to the remote plugin.- Since:
- 2.0.0
-
onReaderEvent
void onReaderEvent(java.lang.String readerName, java.lang.String jsonData)
Invoked when a reader event occurs in order to be forwarded to the remote plugin.This method will only be invoked if the start cart detection functional method has been previously invoked in order to activate the observation of a specific local reader.
- Parameters:
readerName
- The name of the associated local reader.jsonData
- The reader event as a JSON data to forward to the remote plugin.- Since:
- 2.0.0
-
-