Module io.inverno.mod.http.base
Package io.inverno.mod.http.base.header
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 codecB
- 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 Summary
Modifier and TypeFieldDescriptionThe header builder supplier.The supported header names. -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractHeaderCodec
(Supplier<B> builderSupplier, Set<String> supportedHeaderNames) Creates a header codec with the specified builder supplier and supported header names. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of header names supported by the codec.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.inverno.mod.http.base.header.HeaderCodec
decode, decode, encode, encode, encodeValue, encodeValue
-
Field Details
-
builderSupplier
The header builder supplier. -
supportedHeaderNames
The supported header names.
-
-
Constructor Details
-
AbstractHeaderCodec
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 headersupportedHeaderNames
- the list of header names supported by the codec
-
-
Method Details
-
getSupportedHeaderNames
Description copied from interface:HeaderCodec
Returns a list of header names supported by the codec.
- Specified by:
getSupportedHeaderNames
in interfaceHeaderCodec<A extends Header>
- Returns:
- a list of header names
-