Package org.mockserver.mock.action.http
Interface GraphQLSubscriptionHandler.FrameSender
- Enclosing class:
- GraphQLSubscriptionHandler
public static interface GraphQLSubscriptionHandler.FrameSender
Callback interface for sending text frames to the client, with optional delay support.
-
Method Summary
-
Method Details
-
send
Send a text frame, optionally after a delay, then runonSent.onSentMUST be invoked only once the frame has actually been written to the wire (or has been deliberately discarded), never before the delay has elapsed. The subscription sequencer chains the nextnextmessage — and ultimately the terminalcomplete— off this callback, so an implementation that runs it eagerly re-introduces the defect wherecompleteovertakes the delayednextframes and every message is discarded by the client as post-terminal.- Parameters:
ctx- the channel contexttext- the text to senddelay- optional delay before sending (may be null)onSent- continuation invoked after the frame has been written or discarded
-