Interface LocalServiceApi


public interface LocalServiceApi
API associated to a LocalServiceSpi.
Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    executeLocally(String jsonData, String readerName)
    Must be invoked when a message is received from the network remote side in order to invoke a specific service locally.
    boolean
    Returns true if the reader is contactless.
    void
    setPoolPluginNames(String... poolPluginNames)
    Specifies the names of the local pool plugins to manage.
  • Method Details

    • isReaderContactless

      boolean isReaderContactless(String readerName)
      Returns true if the reader is contactless.

      This feature is only useful for the Reader Client Side usage mode. The aim is to enable the local service to immediately retrieve the information in order to send it to the server at the time of the remote service's execution request.

      Parameters:
      readerName - The name of the reader to check.
      Returns:
      True if the reader is contactless
      Throws:
      IllegalStateException - If the service or the reader is no longer registered.
      Since:
      2.2.0
    • setPoolPluginNames

      void setPoolPluginNames(String... poolPluginNames)
      Specifies the names of the local pool plugins to manage.

      This feature is only useful for remote control of pool plugins.

      Parameters:
      poolPluginNames - The list of names of the local pool plugins to manage.
      Throws:
      IllegalStateException - If the service is no longer registered.
      Since:
      2.0.0
    • executeLocally

      String executeLocally(String jsonData, String readerName)
      Must be invoked when a message is received from the network remote side in order to invoke a specific service locally.
      Parameters:
      jsonData - A JSON string containing all information about the service to invoke.
      readerName - The name of the targeted local reader (optional). It is required if the service is specific to a particular reader.
      Returns:
      A JSON string containing the result of the service to send back to the network remote side. It can be empty if the service returns nothing.
      Throws:
      IllegalStateException - If the service or the reader or the associated plugin is no longer registered.
      Since:
      2.0.0