Package jakarta.websocket
Interface Decoder.Text<T>
- Type Parameters:
- T- The type of the object that is decoded
- All Superinterfaces:
- Decoder
- All Known Implementing Classes:
- NoOpTextCoder,- PrimitiveDecoders,- PrimitiveDecoders.BooleanDecoder,- PrimitiveDecoders.ByteDecoder,- PrimitiveDecoders.CharacterDecoder,- PrimitiveDecoders.DoubleDecoder,- PrimitiveDecoders.FloatDecoder,- PrimitiveDecoders.IntegerDecoder,- PrimitiveDecoders.LongDecoder,- PrimitiveDecoders.ShortDecoder,- ReaderDecoder
- Enclosing interface:
- Decoder
This interface defines how a custom object is decoded from a web socket message in the form of a string.
- 
Nested Class SummaryNested classes/interfaces inherited from interface jakarta.websocket.DecoderDecoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>
- 
Method SummaryModifier and TypeMethodDescriptionDecode 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 Details- 
decodeDecode 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
 
- 
willDecodeAnswer 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.
 
 
-