# Interface Decoder

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

public interface Decoder
Base interface for WebSocket message decoders. Decoders convert incoming WebSocket messages from their raw form (text or binary) into application-specific objects.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static interface`
  `Decoder.Binary<T>`
  A decoder that decodes entire binary WebSocket messages into an object of type T.
  `static interface`
  `Decoder.BinaryStream<T>`
  A decoder that decodes entire binary WebSocket messages from an input stream into an object of type T.
  `static interface`
  `Decoder.Text<T>`
  A decoder that decodes entire text WebSocket messages into an object of type T.
  `static interface`
  `Decoder.TextStream<T>`
  A decoder that decodes entire text WebSocket messages from a reader into an object of type T.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default void`
  `destroy()`
  Destroy the decoder.
  `default void`
  `init(EndpointConfig endpointConfig)`
  Initialise the decoder.

- ## Method Details

  - ### init

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

  - ### destroy

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