Interface ObservableRemotePluginApi

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addRemoteReader​(RemoteReaderSpi remoteReaderSpi)
      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 onPluginEvent​(java.lang.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.
      void removeRemoteReader​(java.lang.String remoteReaderName)
      Tries to remove the remote reader having the provided name.
    • Method Detail

      • addRemoteReader

        void addRemoteReader​(RemoteReaderSpi remoteReaderSpi)
        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.
        Parameters:
        remoteReaderSpi - The remote reader to use.
        Throws:
        java.lang.IllegalArgumentException - If the provided reader is null.
        Since:
        2.0.0
      • removeRemoteReader

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

        void onPluginEvent​(java.lang.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:
        java.lang.IllegalArgumentException - If the JSON data is null, empty or malformed.
        Since:
        2.0.0