Top Description Fields Constructors Methods
org.eclipse.jetty.ee10.websocket.jakarta.common.decoders

public Class StringDecoder

extends AbstractDecoder
implements Decoder.Text<String>
Class Inheritance
All Implemented Interfaces
jakarta.websocket.Decoder.Text, jakarta.websocket.Decoder
Imports
jakarta.websocket.DecodeException, .Decoder

Default implementation of the jakarta.websocket.Decoder.Text Message to String decoder

Field Summary

Modifier and TypeField and Description
public static final StringDecoder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
decode(String
string to be decoded.
s
)

Implements jakarta.websocket.Decoder.Text.decode.

Decode the given String into an object of type T.

public boolean
willDecode(String
the string being tested for decodability.
s
)

Implements jakarta.websocket.Decoder.Text.willDecode.

Answer whether the given String can be decoded into an object of type T.

Inherited from org.eclipse.jetty.ee10.websocket.jakarta.common.decoders.AbstractDecoder:
destroyinit

Field Detail

INSTANCEback to summary
public static final StringDecoder INSTANCE

Constructor Detail

StringDecoderback to summary
public StringDecoder()

Method Detail

decodeback to summary
public String decode(String s) throws DecodeException

Implements jakarta.websocket.Decoder.Text.decode.

Doc from jakarta.websocket.Decoder.Text.decode.

Decode the given String into an object of type T.

Parameters
s:String

string to be decoded.

Returns:String

the decoded message as an object of type T

Annotations
@Override
Exceptions
DecodeException:
If the provided string cannot be decoded to type T
willDecodeback to summary
public boolean willDecode(String s)

Implements jakarta.websocket.Decoder.Text.willDecode.

Doc from jakarta.websocket.Decoder.Text.willDecode.

Answer whether the given String can be decoded into an object of type T.

Parameters
s:String

the string being tested for decodability.

Returns:boolean

whether this decoder can decoded the supplied string.

Annotations
@Override