Interface LocalServiceApi


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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String executeLocally​(java.lang.String jsonData, java.lang.String readerName)
      Must be invoked when a message is received from the network remote side in order to invoke a specific service locally.
      void setPoolPluginNames​(java.lang.String... poolPluginNames)
      Specifies the names of the local pool plugins to manage.
    • Method Detail

      • setPoolPluginNames

        void setPoolPluginNames​(java.lang.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:
        java.lang.IllegalStateException - If the service is no longer registered.
        Since:
        2.0.0
      • executeLocally

        java.lang.String executeLocally​(java.lang.String jsonData,
                                        java.lang.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:
        java.lang.IllegalStateException - If the service or the reader or the associated plugin is no longer registered.
        Since:
        2.0.0