Interface TextMessageCodec<T>

Type Parameters:
T -
All Superinterfaces:
MessageCodec<T,String>
All Known Implementing Classes:
JsonTextMessageCodec

@Experimental("This API is experimental and may change in the future") public interface TextMessageCodec<T> extends MessageCodec<T,String>
Used to encode and decode text messages.

Special types of messages

Some types of messages bypass the encoding/decoding process:
  • io.vertx.core.buffer.Buffer,
  • byte[],
  • java.lang.String,
  • io.vertx.core.json.JsonObject.
  • io.vertx.core.json.JsonArray.
The encoding/decoding details are described in OnTextMessage.

CDI beans

Implementation classes must be CDI beans. Qualifiers are ignored. Dependent beans are reused during encoding/decoding.

Lifecycle and concurrency

Codecs are shared accross all WebSocket connections. Therefore, implementations should be either stateless or thread-safe.
See Also: