Interface BinaryMessageCodec<T>

Type Parameters:
T -
All Superinterfaces:
MessageCodec<T,io.vertx.core.buffer.Buffer>

@Experimental("This API is experimental and may change in the future") public interface BinaryMessageCodec<T> extends MessageCodec<T,io.vertx.core.buffer.Buffer>
Used to encode and decode binary 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 OnBinaryMessage.

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: