Class VantiqSubscriber

java.lang.Object
okhttp3.WebSocketListener
io.vantiq.client.internal.VantiqSubscriber

public class VantiqSubscriber extends okhttp3.WebSocketListener
Internal class that manages subscriptions to a Vantiq server.
  • Constructor Details

    • VantiqSubscriber

      public VantiqSubscriber(VantiqSession session, okhttp3.OkHttpClient client, boolean enablePings)
  • Method Details

    • connect

      public void connect(VantiqSubscriberLifecycleListener lifecycleHandler)
    • subscribe

      public void subscribe(String path, SubscriptionCallback callback, Map<String,Object> parameters)
    • ack

      public void ack(String requestId, String subscriptionId, Double sequenceId, Double partitionId)
    • close

      public void close()
    • startPeriodicPings

      public void startPeriodicPings()
    • onOpen

      public void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response)
      Overrides:
      onOpen in class okhttp3.WebSocketListener
    • onFailure

      public void onFailure(@NotNull okhttp3.WebSocket webSocket, @NotNull Throwable t, okhttp3.Response response)
      Overrides:
      onFailure in class okhttp3.WebSocketListener
    • onMessage

      public void onMessage(@NotNull okhttp3.WebSocket webSocket, okio.ByteString bodyBytes)
      Overrides:
      onMessage in class okhttp3.WebSocketListener
    • onClosed

      public void onClosed(@NotNull okhttp3.WebSocket webSocket, int code, @NotNull String reason)
      Overrides:
      onClosed in class okhttp3.WebSocketListener