Search in sources :

Example 1 with ServerSentEventHttpMessageReader

use of org.springframework.http.codec.ServerSentEventHttpMessageReader in project spring-framework by spring-projects.

the class DefaultExchangeStrategiesBuilder method defaultReaders.

private void defaultReaders() {
    messageReader(new DecoderHttpMessageReader<>(new ByteArrayDecoder()));
    messageReader(new DecoderHttpMessageReader<>(new ByteBufferDecoder()));
    messageReader(new ServerSentEventHttpMessageReader(sseDecoders()));
    messageReader(new DecoderHttpMessageReader<>(new StringDecoder(false)));
    if (jaxb2Present) {
        messageReader(new DecoderHttpMessageReader<>(new Jaxb2XmlDecoder()));
    }
    if (jackson2Present) {
        messageReader(new DecoderHttpMessageReader<>(new Jackson2JsonDecoder()));
    }
}
Also used : ServerSentEventHttpMessageReader(org.springframework.http.codec.ServerSentEventHttpMessageReader) Jackson2JsonDecoder(org.springframework.http.codec.json.Jackson2JsonDecoder) Jaxb2XmlDecoder(org.springframework.http.codec.xml.Jaxb2XmlDecoder) StringDecoder(org.springframework.core.codec.StringDecoder) ByteBufferDecoder(org.springframework.core.codec.ByteBufferDecoder) ByteArrayDecoder(org.springframework.core.codec.ByteArrayDecoder)

Aggregations

ByteArrayDecoder (org.springframework.core.codec.ByteArrayDecoder)1 ByteBufferDecoder (org.springframework.core.codec.ByteBufferDecoder)1 StringDecoder (org.springframework.core.codec.StringDecoder)1 ServerSentEventHttpMessageReader (org.springframework.http.codec.ServerSentEventHttpMessageReader)1 Jackson2JsonDecoder (org.springframework.http.codec.json.Jackson2JsonDecoder)1 Jaxb2XmlDecoder (org.springframework.http.codec.xml.Jaxb2XmlDecoder)1