@Singleton
public class WebSocketMessageEncoder
extends java.lang.Object
Constructor and Description |
---|
WebSocketMessageEncoder(MediaTypeCodecRegistry codecRegistry) |
Modifier and Type | Method and Description |
---|---|
io.netty.handler.codec.http.websocketx.WebSocketFrame |
encodeMessage(java.lang.Object message,
MediaType mediaType)
Encode the given message with the given media type.
|
public WebSocketMessageEncoder(MediaTypeCodecRegistry codecRegistry)
codecRegistry
- The codec registrypublic io.netty.handler.codec.http.websocketx.WebSocketFrame encodeMessage(java.lang.Object message, MediaType mediaType)
message
- The messagemediaType
- The media type