- All Superinterfaces:
RuntimeType.Api<ContentEncodingContextConfig>
Content encoding support to obtain encoders and decoders.
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Builder to set up this encoding support context.boolean
There is at least one content decoder.boolean
contentDecodingSupported
(String encodingId) Whether there is a content decoder for the provided id.boolean
There is at least one content encoder.boolean
contentEncodingSupported
(String encodingId) Whether there is a content encoder for the provided id.static ContentEncodingContext
create()
Create a new encoding support.static ContentEncodingContext
Create a new encoding support and apply provided configuration.static ContentEncodingContext
create
(ContentEncodingContextConfig config) Create content encoding context from its prototype.static ContentEncodingContext
create
(Consumer<ContentEncodingContextConfig.Builder> consumer) Create media context, customizing its configuration.Obtain a content decoder for the id.Discover content encoder based on the HTTP headers.Obtain a content encoder for the id.Methods inherited from interface io.helidon.builder.api.RuntimeType.Api
prototype
-
Method Details
-
create
Create a new encoding support.- Returns:
- content encoding support
-
create
Create a new encoding support and apply provided configuration.- Parameters:
config
- configuration to use- Returns:
- content encoding support
-
create
Create content encoding context from its prototype.- Parameters:
config
- content encoding context configuration- Returns:
- a new content encoding context
-
create
Create media context, customizing its configuration.- Parameters:
consumer
- consumer of media context builder- Returns:
- a new media context
-
builder
Builder to set up this encoding support context.- Returns:
- a new builder
-
contentEncodingEnabled
boolean contentEncodingEnabled()There is at least one content encoder.- Returns:
- whether there is at least one content encoder
-
contentDecodingEnabled
boolean contentDecodingEnabled()There is at least one content decoder.- Returns:
- whether there is at least one content decoder
-
contentEncodingSupported
Whether there is a content encoder for the provided id.- Parameters:
encodingId
- encoding id- Returns:
- whether a provider exists for this id
-
contentDecodingSupported
Whether there is a content decoder for the provided id.- Parameters:
encodingId
- encoding id- Returns:
- whether a provider exists for this id
-
encoder
Obtain a content encoder for the id.- Parameters:
encodingId
- encoding id- Returns:
- content encoder to use
- Throws:
NoSuchElementException
- in case an encoding provider does not exist
-
decoder
Obtain a content decoder for the id.- Parameters:
encodingId
- encoding id- Returns:
- content decoder to use
- Throws:
NoSuchElementException
- in case a decoding provider does not exist
-
encoder
Discover content encoder based on the HTTP headers.- Parameters:
headers
- headers to analyze- Returns:
- content encoder to use
-