Package jakarta.websocket
Interface Decoder.Text<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jakarta.websocket.Decoder
Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tdecode(String s)Decode the given String into an object of type T.booleanwillDecode(String s)Answer whether the given String can be decoded into an object of type T.
-
-
-
Method Detail
-
decode
T decode(String s) throws DecodeException
Decode the given String into an object of type T.- Parameters:
s- string to be decoded.- Returns:
- the decoded message as an object of type T
- Throws:
DecodeException- If the provided string cannot be decoded to type T
-
willDecode
boolean willDecode(String s)
Answer whether the given String can be decoded into an object of type T.- Parameters:
s- the string being tested for decodability.- Returns:
- whether this decoder can decoded the supplied string.
-
-