Interface Decoder.Text<T>

Type Parameters:
T - The type of object produced by the decoder
All Superinterfaces:
Decoder
Enclosing interface:
Decoder

public static interface Decoder.Text<T> extends Decoder
A decoder that decodes entire text WebSocket messages into an object of type T.
  • Method Details

    • decode

      T decode(String s) throws DecodeException
      Decodes the text data into an object.
      Parameters:
      s - The text data to decode
      Returns:
      The decoded object
      Throws:
      DecodeException - If the data cannot be decoded
    • willDecode

      boolean willDecode(String s)
      Determines whether this decoder can decode the given text data.
      Parameters:
      s - The text data to check
      Returns:
      true if this decoder can decode the data