Class BrokerSseSubscription

java.lang.Object
markets.alpaca.client.broker.sse.BrokerSseSubscription
All Implemented Interfaces:
AutoCloseable

public final class BrokerSseSubscription extends Object implements AutoCloseable
Handle for a Broker SSE subscription.

Closing the handle cancels the underlying OkHttp EventSource.

  • Method Details

    • eventSource

      public okhttp3.sse.EventSource eventSource()
      Returns the underlying OkHttp SSE event source.
    • close

      public void close()
      Cancels the SSE stream.
      Specified by:
      close in interface AutoCloseable