Class AbstractHeaderCodec<A extends Header,B extends HeaderBuilder<A,B>>

java.lang.Object
io.inverno.mod.http.base.header.AbstractHeaderCodec<A,B>
Type Parameters:
A - the header type encoded/decoded by the codec
B - the header builder type
All Implemented Interfaces:
HeaderCodec<A>

public abstract class AbstractHeaderCodec<A extends Header,B extends HeaderBuilder<A,B>> extends Object implements HeaderCodec<A>

Base implementation for HeaderCodec.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Field Details

    • builderSupplier

      protected Supplier<B extends HeaderBuilder<A,B>> builderSupplier
      The header builder supplier.
    • supportedHeaderNames

      protected Set<String> supportedHeaderNames
      The supported header names.
  • Constructor Details

    • AbstractHeaderCodec

      protected AbstractHeaderCodec(Supplier<B> builderSupplier, Set<String> supportedHeaderNames)

      Creates a header codec with the specified builder supplier and supported header names.

      Parameters:
      builderSupplier - a supplier to create header builder instances when decoding a header
      supportedHeaderNames - the list of header names supported by the codec
  • Method Details