To use SSE, we need to register SseFeature
on both the client and server sides. By doing so, the client/server gets connected to SseFeature
to be used while traversing data over the network.
In the SSE: Internal Working diagram, we assume that the client/server is connected. When any new event is generated, the server initiates an OutboundEvent
instance that will be responsible to have chunked output, which in turn will have a serialized data format. OutboundEventWriter
is responsible to serialize the data on the server side. We need to specify the media type of the data in OutboundEvent
. There are no restrictions of providing specific media types only.
However, on the client side, InboundEvent
is responsible for handling the incoming data from the server. Here, InboundEvent
receives the chunked input that contains serialized data format. Using InbounEventReader
, data is deserialized.
Using SSEBroadCaster
, we are able to broadcast events...