Package markets.alpaca.client.broker.sse
Class BrokerSseSubscription
java.lang.Object
markets.alpaca.client.broker.sse.BrokerSseSubscription
- All Implemented Interfaces:
AutoCloseable
Handle for a Broker SSE subscription.
Closing the handle cancels the underlying OkHttp EventSource.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Cancels the SSE stream.okhttp3.sse.EventSourceReturns the underlying OkHttp SSE event source.
-
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:
closein interfaceAutoCloseable
-