@ChannelHandler.Sharable public class ServerSentEventEncoder extends io.netty.handler.codec.MessageToByteEncoder<ServerSentEvent>
ServerSentEvent to a ByteBuf| Constructor and Description |
|---|
ServerSentEventEncoder() |
ServerSentEventEncoder(boolean splitSseData)
Splits the SSE data on new line and create multiple "data" events if
splitSseData is true |
| Modifier and Type | Method and Description |
|---|---|
protected void |
encode(io.netty.channel.ChannelHandlerContext ctx,
ServerSentEvent serverSentEvent,
io.netty.buffer.ByteBuf out) |
acceptOutboundMessage, allocateBuffer, writebind, close, connect, deregister, disconnect, flush, readexceptionCaught, handlerAdded, handlerRemoved, isSharablepublic ServerSentEventEncoder()
public ServerSentEventEncoder(boolean splitSseData)
splitSseData is truesplitSseData - true if the SSE data is to be splitted on new line to create multiple "data" events.protected void encode(io.netty.channel.ChannelHandlerContext ctx,
ServerSentEvent serverSentEvent,
io.netty.buffer.ByteBuf out)
throws java.lang.Exception
encode in class io.netty.handler.codec.MessageToByteEncoder<ServerSentEvent>java.lang.Exception