Interface ObservableRemotePluginApi


public interface ObservableRemotePluginApi
API associated to a ObservableRemotePluginSpi.
Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addRemoteReader(RemoteReaderSpi remoteReaderSpi, int clientCoreApiLevel)
    Creates a remote reader using the provided RemoteReaderSpi or ObservableRemoteReaderSpi, registers it and notifies all plugin's observers for the connection of the new reader.
    void
    Must be invoked when a message containing a plugin event is received from the distributed local service in order to be forward to the associated observable remote plugin.
    void
    removeRemoteReader(String remoteReaderName)
    Tries to remove the remote reader having the provided name.
  • Method Details

    • addRemoteReader

      void addRemoteReader(RemoteReaderSpi remoteReaderSpi, int clientCoreApiLevel)
      Creates a remote reader using the provided RemoteReaderSpi or ObservableRemoteReaderSpi, registers it and notifies all plugin's observers for the connection of the new reader.

      The clientCoreApiLevel parameter will enable the Distributed layer to transmit the client's Core layer API level to the server's Core layer when a reader creation request is made.

      Parameters:
      remoteReaderSpi - The remote reader to use.
      clientCoreApiLevel - The JSON API level of the associated client Core layer or -1 if unknown at this step.
      Throws:
      IllegalArgumentException - If the provided reader is null.
      Since:
      2.0.0
    • removeRemoteReader

      void removeRemoteReader(String remoteReaderName)
      Tries to remove the remote reader having the provided name.
      Parameters:
      remoteReaderName - The name of the remote reader.
      Throws:
      IllegalArgumentException - If reader name is null or empty.
      Since:
      2.0.0
    • onPluginEvent

      void onPluginEvent(String jsonData)
      Must be invoked when a message containing a plugin event is received from the distributed local service in order to be forward to the associated observable remote plugin.
      Parameters:
      jsonData - A JSON string containing the plugin event.
      Throws:
      IllegalArgumentException - If the JSON data is null, empty or malformed.
      Since:
      2.0.0