Interface SubscriptionCallback


public interface SubscriptionCallback
Interface that listens for events subscribed to from a Vantiq server.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called once the connection has been established and the subscription has been acknowledged by the Vantiq server.
    void
    onError(String error)
    Called whenever an error occurs that does not arise from an exception, such as if a non-success response is provided.
    void
    Called whenever an exception occurs during the subscription processing.
    void
    Called for every matching event that occurs
  • Method Details

    • onConnect

      void onConnect()
      Called once the connection has been established and the subscription has been acknowledged by the Vantiq server.
    • onMessage

      void onMessage(SubscriptionMessage message)
      Called for every matching event that occurs
      Parameters:
      message - The information associated with the event
    • onError

      void onError(String error)
      Called whenever an error occurs that does not arise from an exception, such as if a non-success response is provided.
      Parameters:
      error - The error message
    • onFailure

      void onFailure(Throwable t)
      Called whenever an exception occurs during the subscription processing.
      Parameters:
      t - The exception thrown