Package com.longbridge.agent
Class ConversationStreamSubscription
- java.lang.Object
-
- com.longbridge.agent.ConversationStreamSubscription
-
- All Implemented Interfaces:
Flow.Subscription
public class ConversationStreamSubscription extends Object implements Flow.Subscription
AFlow.Subscriptionfor a conversation event stream.This wraps a native handle backed by real demand/credit bookkeeping: no more events are pulled off the underlying SSE stream than have been
requested. Callrequest(long)fromFlow.Subscriber.onSubscribe(java.util.concurrent.Flow.Subscription)(and again whenever more events are wanted), andcancel()to stop the stream early.
-
-
Method Detail
-
request
public void request(long n)
- Specified by:
requestin interfaceFlow.Subscription
-
cancel
public void cancel()
- Specified by:
cancelin interfaceFlow.Subscription
-
-