Interface Encoder

All Known Subinterfaces:
Encoder.Binary<T>, Encoder.BinaryStream<T>, Encoder.Text<T>, Encoder.TextStream<T>

public interface Encoder
Base interface for WebSocket message encoders. Encoders convert application-specific objects into WebSocket messages in text or binary form.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    An encoder that encodes an object of type T into a binary WebSocket message.
    static interface 
    An encoder that encodes an object of type T into a binary WebSocket message written to an OutputStream.
    static interface 
    An encoder that encodes an object of type T into a text WebSocket message.
    static interface 
    An encoder that encodes an object of type T into a text WebSocket message written to a Writer.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Destroy the encoder.
    default void
    init(EndpointConfig endpointConfig)
    Initialise the encoder.
  • Method Details

    • init

      default void init(EndpointConfig endpointConfig)
      Initialise the encoder. The default implementation is a NO-OP.
      Parameters:
      endpointConfig - The end-point configuration
    • destroy

      default void destroy()
      Destroy the encoder. The default implementation is a NO-OP.