Class AwsIotObservingSubscriber

  • All Implemented Interfaces:
    io.reactivex.Observer<com.scaleoutsoftware.soss.client.Event>, java.io.Serializable, java.util.Observer

    public class AwsIotObservingSubscriber
    extends java.lang.Object
    implements io.reactivex.Observer<com.scaleoutsoftware.soss.client.Event>, java.io.Serializable, java.util.Observer
    The AwsIotObservingSubscriber handles establishing new connections with AWS IoT core and reposting messages from AWS IoT core to established DigitalTwins.
    See Also:
    Serialized Form
    • Method Summary

      Modifier and Type Method Description
      void onComplete()
      Called by reactiveX if the subscriber unsubscribes
      void onError​(java.lang.Throwable e)
      Called by reactiveX if an error occurs.
      void onNext​(com.scaleoutsoftware.soss.client.Event event)
      Handles each incoming event
      void onSubscribe​(io.reactivex.disposables.Disposable d)
      Handles one-time initialization for this observer.
      void update​(java.util.Observable o, java.lang.Object arg)
      Called when the SOSS store membership changes and we need to reevaluate our AWS IoT Core connections.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onSubscribe

        public void onSubscribe​(io.reactivex.disposables.Disposable d)
        Handles one-time initialization for this observer.
        Specified by:
        onSubscribe in interface io.reactivex.Observer<com.scaleoutsoftware.soss.client.Event>
        Parameters:
        d - ignored.
      • onNext

        public void onNext​(com.scaleoutsoftware.soss.client.Event event)
        Handles each incoming event
        Specified by:
        onNext in interface io.reactivex.Observer<com.scaleoutsoftware.soss.client.Event>
        Parameters:
        event - the event to process
      • onError

        public void onError​(java.lang.Throwable e)
        Called by reactiveX if an error occurs.
        Specified by:
        onError in interface io.reactivex.Observer<com.scaleoutsoftware.soss.client.Event>
        Parameters:
        e - the exception thrown during onNext()
      • onComplete

        public void onComplete()
        Called by reactiveX if the subscriber unsubscribes
        Specified by:
        onComplete in interface io.reactivex.Observer<com.scaleoutsoftware.soss.client.Event>
      • update

        public void update​(java.util.Observable o,
                           java.lang.Object arg)
        Called when the SOSS store membership changes and we need to reevaluate our AWS IoT Core connections.
        Specified by:
        update in interface java.util.Observer
        Parameters:
        o - the observable that called update (MembershipPollingThread)
        arg - the HostToPartitionMapping