Interface Decoder.TextStream<T>

  • Type Parameters:
    T - The type of the object that is decoded
    All Superinterfaces:
    Enclosing interface:

    public static interface Decoder.TextStream<T>
    extends Decoder
    This interface defines how a custom object of type T is decoded from a web socket message in the form of a character stream.
    • Method Detail

      • decode

        T decode​( reader)
          throws DecodeException,
        Reads the websocket message from the implementation provided Reader and decodes it into an instance of the supplied object type.
        reader - the reader from which to read the web socket message.
        the instance of the object that is the decoded web socket message.
        DecodeException - If the data from the provided reader cannot be decoded to type T - If an error occurs reading from the reader