Class WebSocketMessageEncoder
java.lang.Object
io.micronaut.http.netty.websocket.WebSocketMessageEncoder
@Requires(classes=WebSocketSessionException.class)
@Singleton
public class WebSocketMessageEncoder
extends Object
Encapsulate functionality to encode WebSocket messages.
- Since:
- 1.0
- Author:
- sdelamo
-
Constructor Summary
ConstructorDescriptionWebSocketMessageEncoder
(MediaTypeCodecRegistry codecRegistry) Deprecated, for removal: This API element is subject to removal in a future version.Not used anymoreWebSocketMessageEncoder
(MediaTypeCodecRegistry codecRegistry, MessageBodyHandlerRegistry messageBodyHandlerRegistry) -
Method Summary
Modifier and TypeMethodDescriptionio.netty.handler.codec.http.websocketx.WebSocketFrame
encodeMessage
(Object message, MediaType mediaType) Encode the given message with the given media type.
-
Constructor Details
-
WebSocketMessageEncoder
@Deprecated(forRemoval=true, since="4.7") public WebSocketMessageEncoder(MediaTypeCodecRegistry codecRegistry) Deprecated, for removal: This API element is subject to removal in a future version.Not used anymore- Parameters:
codecRegistry
- The codec registry
-
WebSocketMessageEncoder
@Inject public WebSocketMessageEncoder(MediaTypeCodecRegistry codecRegistry, MessageBodyHandlerRegistry messageBodyHandlerRegistry) - Parameters:
codecRegistry
- The codec registrymessageBodyHandlerRegistry
- The message body handler registry
-
-
Method Details