Interface SubjectConsumer<T>


public interface SubjectConsumer<T>

The SubjectConsumer interface allows applications to receive json events raised for a subscription.

Note:: the SubjectConsumer methods are not called on a dedicated worker thread. Therefore, if any of these methods are likely take a relatively long time to execute, they should be coded to run in a separate thread.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onError(SubjectError subjectError)
    Called if there is a subscription error
    void
    onNext(T message)
    Called when an update is received
    void
    onStatus(SubjectStatus subjectStatus)
    Called when the object status changes
  • Method Details

    • onNext

      void onNext(T message)
      Called when an update is received
      Parameters:
      message - the message updated
    • onError

      void onError(SubjectError subjectError)
      Called if there is a subscription error
      Parameters:
      subjectError - the subject error
    • onStatus

      void onStatus(SubjectStatus subjectStatus)
      Called when the object status changes
      Parameters:
      subjectStatus - the object status