Class WebSocketMessageEncoder
- java.lang.Object
-
- io.micronaut.http.netty.websocket.WebSocketMessageEncoder
-
@Singleton public class WebSocketMessageEncoder extends java.lang.ObjectEncapsulate functionality to encode WebSocket messages.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description WebSocketMessageEncoder(io.micronaut.http.codec.MediaTypeCodecRegistry codecRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.handler.codec.http.websocketx.WebSocketFrameencodeMessage(java.lang.Object message, io.micronaut.http.MediaType mediaType)Encode the given message with the given media type.
-
-
-
Method Detail
-
encodeMessage
public io.netty.handler.codec.http.websocketx.WebSocketFrame encodeMessage(java.lang.Object message, io.micronaut.http.MediaType mediaType)Encode the given message with the given media type.- Parameters:
message- The messagemediaType- The media type- Returns:
- The encoded frame
-
-