Interface CodecConfigurer.DefaultCodecs

All Known Subinterfaces:
ClientCodecConfigurer.ClientDefaultCodecs, ServerCodecConfigurer.ServerDefaultCodecs
Enclosing interface:
CodecConfigurer

public static interface CodecConfigurer.DefaultCodecs
Customize or replace the HTTP message readers and writers registered by default. The options are further extended by ClientDefaultCodecs and ServerDefaultCodecs.
  • Method Details

    • jackson2JsonDecoder

      void jackson2JsonDecoder(Decoder<?> decoder)
      Override the default Jackson JSON Decoder.

      Note that maxInMemorySize(int), if configured, will be applied to the given decoder.

      Parameters:
      decoder - the decoder instance to use
      See Also:
    • jackson2JsonEncoder

      void jackson2JsonEncoder(Encoder<?> encoder)
      Override the default Jackson JSON Encoder.
      Parameters:
      encoder - the encoder instance to use
      See Also:
    • jackson2SmileDecoder

      void jackson2SmileDecoder(Decoder<?> decoder)
      Override the default Jackson Smile Decoder.

      Note that maxInMemorySize(int), if configured, will be applied to the given decoder.

      Parameters:
      decoder - the decoder instance to use
      See Also:
    • jackson2SmileEncoder

      void jackson2SmileEncoder(Encoder<?> encoder)
      Override the default Jackson Smile Encoder.
      Parameters:
      encoder - the encoder instance to use
      See Also:
    • protobufDecoder

      void protobufDecoder(Decoder<?> decoder)
      Override the default Protobuf Decoder.

      Note that maxInMemorySize(int), if configured, will be applied to the given decoder.

      Parameters:
      decoder - the decoder instance to use
      Since:
      5.1
      See Also:
    • protobufEncoder

      void protobufEncoder(Encoder<?> encoder)
      Override the default Protobuf Encoder.
      Parameters:
      encoder - the encoder instance to use
      Since:
      5.1
      See Also:
    • jaxb2Decoder

      void jaxb2Decoder(Decoder<?> decoder)
      Override the default JAXB2 Decoder.

      Note that maxInMemorySize(int), if configured, will be applied to the given decoder.

      Parameters:
      decoder - the decoder instance to use
      Since:
      5.1.3
      See Also:
    • jaxb2Encoder

      void jaxb2Encoder(Encoder<?> encoder)
      Override the default JABX2 Encoder.
      Parameters:
      encoder - the encoder instance to use
      Since:
      5.1.3
      See Also:
    • kotlinSerializationCborDecoder

      void kotlinSerializationCborDecoder(Decoder<?> decoder)
      Override the default Kotlin Serialization CBOR Decoder.
      Parameters:
      decoder - the decoder instance to use
      Since:
      6.0
      See Also:
    • kotlinSerializationCborEncoder

      void kotlinSerializationCborEncoder(Encoder<?> encoder)
      Override the default Kotlin Serialization CBOR Encoder.
      Parameters:
      encoder - the encoder instance to use
      Since:
      6.0
      See Also:
    • kotlinSerializationJsonDecoder

      void kotlinSerializationJsonDecoder(Decoder<?> decoder)
      Override the default Kotlin Serialization JSON Decoder.
      Parameters:
      decoder - the decoder instance to use
      Since:
      5.3
      See Also:
    • kotlinSerializationJsonEncoder

      void kotlinSerializationJsonEncoder(Encoder<?> encoder)
      Override the default Kotlin Serialization JSON Encoder.
      Parameters:
      encoder - the encoder instance to use
      Since:
      5.3
      See Also:
    • kotlinSerializationProtobufDecoder

      void kotlinSerializationProtobufDecoder(Decoder<?> decoder)
      Override the default Kotlin Serialization Protobuf Decoder.
      Parameters:
      decoder - the decoder instance to use
      Since:
      6.0
      See Also:
    • kotlinSerializationProtobufEncoder

      void kotlinSerializationProtobufEncoder(Encoder<?> encoder)
      Override the default Kotlin Serialization Protobuf Encoder.
      Parameters:
      encoder - the encoder instance to use
      Since:
      6.0
      See Also:
    • configureDefaultCodec

      void configureDefaultCodec(Consumer<Object> codecConsumer)
      Register a consumer to apply to default config instances. This can be used to configure rather than replace a specific codec or multiple codecs. The consumer is applied to every default Encoder, Decoder, HttpMessageReader and HttpMessageWriter instance.
      Parameters:
      codecConsumer - the consumer to apply
      Since:
      5.3.4
    • maxInMemorySize

      void maxInMemorySize(int byteCount)
      Configure a limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated. This can be a result of decoding to a single DataBuffer, ByteBuffer, byte[], Resource, String, etc. It can also occur when splitting the input stream, e.g. delimited text, in which case the limit applies to data buffered between delimiters.

      By default this is not set, in which case individual codec defaults apply. All codecs are limited to 256K by default.

      Parameters:
      byteCount - the max number of bytes to buffer, or -1 for unlimited
      Since:
      5.1.11
    • enableLoggingRequestDetails

      void enableLoggingRequestDetails(boolean enable)
      Whether to log form data at DEBUG level, and headers at TRACE level. Both may contain sensitive information.

      By default set to false so that request details are not shown.

      Parameters:
      enable - whether to enable or not
      Since:
      5.1