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

public Class ReaderDecoder

extends Object
implements Decoder.TextStream<Reader>
Class Inheritance
All Implemented Interfaces
jakarta.websocket.Decoder.TextStream, jakarta.websocket.Decoder
Imports
java.io.IOException, .Reader, jakarta.websocket.DecodeException, .Decoder, .EndpointConfig

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Reader
decode(Reader
the reader from which to read the web socket message.
reader
)

Implements jakarta.websocket.Decoder.TextStream.decode.

Reads the websocket message from the implementation provided Reader and decodes it into an instance of the supplied object type.

public void
destroy()

Overrides default jakarta.websocket.Decoder.destroy.

This method is called when the decoder is about to be removed from service in order that any resources the decoder used may be closed gracefully.

public void
init(EndpointConfig
the endpoint configuration object when being brought into service
config
)

Overrides default jakarta.websocket.Decoder.init.

This method is called with the endpoint configuration object of the endpoint this decoder is intended for when it is about to be brought into service.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ReaderDecoderback to summary
public ReaderDecoder()

Method Detail

decodeback to summary
public Reader decode(Reader reader) throws DecodeException, IOException

Implements jakarta.websocket.Decoder.TextStream.decode.

Doc from jakarta.websocket.Decoder.TextStream.decode.

Reads the websocket message from the implementation provided Reader and decodes it into an instance of the supplied object type.

Parameters
reader:Reader

the reader from which to read the web socket message.

Returns:Reader

the instance of the object that is the decoded web socket message.

Annotations
@Override
Exceptions
DecodeException:
If the data from the provided reader cannot be decoded to type T
IOException:
If an error occurs reading from the reader
destroyback to summary
public void destroy()

Overrides default jakarta.websocket.Decoder.destroy.

Doc from jakarta.websocket.Decoder.destroy.

This method is called when the decoder is about to be removed from service in order that any resources the decoder used may be closed gracefully.

Annotations
@Override
initback to summary
public void init(EndpointConfig config)

Overrides default jakarta.websocket.Decoder.init.

Doc from jakarta.websocket.Decoder.init.

This method is called with the endpoint configuration object of the endpoint this decoder is intended for when it is about to be brought into service.

Parameters
config:EndpointConfig

the endpoint configuration object when being brought into service

Annotations
@Override