- java.lang.Object
-
- io.helidon.media.common.MediaContext
-
public final class MediaContext extends Object
Media support.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MediaContext.Builder
MediaSupport builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MediaContext.Builder
builder()
Create a newMediaContext.Builder
instance.static MediaContext
create()
Create a new instance with default readers and writers registered to the contexts.static MediaContext
create(Config config)
Create a new instance based on the configuration.static MediaContext
empty()
Creates new empty instance without registered defaults.MessageBodyReaderContext
readerContext()
Get the configured reader context.MessageBodyWriterContext
writerContext()
Get the configured writer context.
-
-
-
Method Detail
-
create
public static MediaContext create()
Create a new instance with default readers and writers registered to the contexts.- Returns:
- instance with defaults
-
create
public static MediaContext create(Config config)
Create a new instance based on the configuration.- Parameters:
config
- aConfig
- Returns:
- instance based on config
-
empty
public static MediaContext empty()
Creates new empty instance without registered defaults.- Returns:
- empty instance
-
builder
public static MediaContext.Builder builder()
Create a newMediaContext.Builder
instance.- Returns:
- a new
MediaContext.Builder
-
readerContext
public MessageBodyReaderContext readerContext()
Get the configured reader context.- Returns:
- MessageBodyReaderContext
-
writerContext
public MessageBodyWriterContext writerContext()
Get the configured writer context.- Returns:
- MessageBodyWriterContext
-
-