Class JsonTextMessageCodec
java.lang.Object
io.quarkus.websockets.next.runtime.JsonTextMessageCodec
- All Implemented Interfaces:
MessageCodec<Object,,String> TextMessageCodec<Object>
@Singleton
@Priority(0)
public class JsonTextMessageCodec
extends Object
implements TextMessageCodec<Object>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) com.fasterxml.jackson.databind.ObjectMapper -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
mapper
@Inject com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Constructor Details
-
JsonTextMessageCodec
public JsonTextMessageCodec()
-
-
Method Details
-
encode
- Specified by:
encodein interfaceMessageCodec<Object,String> - Parameters:
value- the value to encode, must not benull- Returns:
- the encoded representation of the value
-
decode
- Specified by:
decodein interfaceMessageCodec<Object,String> - Parameters:
type- the type of the object to decode, must not benullvalue- the value to decode, must not benull- Returns:
- the decoded representation of the value
-
supports
- Specified by:
supportsin interfaceMessageCodec<Object,String> - Parameters:
type- the type to handle, must not benull- Returns:
trueif this codec can encode/decode the provided type,falseotherwise
-