Class SseRequestResult.HandshakeAccepted

java.lang.Object
com.soklet.SseRequestResult.HandshakeAccepted
All Implemented Interfaces:
SseRequestResult
Enclosing interface:
SseRequestResult

@ThreadSafe public static final class SseRequestResult.HandshakeAccepted extends Object implements SseRequestResult
Represents the result of an SSE accepted handshake (connection stays open) when simulated by Simulator.performSseRequest(Request).

The registerEventConsumer(Consumer) and registerCommentConsumer(Consumer) methods can be used to "listen" for Server-Sent Events and Comments, respectively.

The data provided when the handshake was accepted is available via getSseHandshakeResult(), and the final data sent to the client is available via getHttpRequestResult().

Author:
Mark Allen