-
- Type Parameters:
T
- Type of the class which this builder support is added to.
- All Known Implementing Classes:
MediaContext.Builder
,WebClient.Builder
,WebServer.Builder
public interface MediaContextBuilder<T>
Adds methods to support adding readers, writers and media services to the builder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description T
addMediaSupport(MediaSupport mediaSupport)
Adds new instance ofMediaSupport
.default T
addMediaSupport(Supplier<MediaSupport> mediaSupportSupplier)
Adds new instance ofMediaSupport
.T
addReader(MessageBodyReader<?> reader)
Registers new reader.default T
addReader(Supplier<MessageBodyReader<?>> readerSupplier)
Registers new reader.T
addStreamReader(MessageBodyStreamReader<?> streamReader)
Registers new stream reader.default T
addStreamReader(Supplier<MessageBodyStreamReader<?>> streamReaderSupplier)
Registers new stream reader.T
addStreamWriter(MessageBodyStreamWriter<?> streamWriter)
Registers new stream writer.default T
addStreamWriter(Supplier<MessageBodyStreamWriter<?>> streamWriterSupplier)
Registers new stream writer.T
addWriter(MessageBodyWriter<?> writer)
Registers new writer.default T
addWriter(Supplier<MessageBodyWriter<?>> writerSupplier)
Registers new writer.
-
-
-
Method Detail
-
addMediaSupport
T addMediaSupport(MediaSupport mediaSupport)
Adds new instance ofMediaSupport
.- Parameters:
mediaSupport
- media support- Returns:
- updated instance of the builder
-
addMediaSupport
default T addMediaSupport(Supplier<MediaSupport> mediaSupportSupplier)
Adds new instance ofMediaSupport
.- Parameters:
mediaSupportSupplier
- supplier for media support- Returns:
- updated instance of the builder
-
addReader
T addReader(MessageBodyReader<?> reader)
Registers new reader.- Parameters:
reader
- reader- Returns:
- updated instance of the builder
-
addReader
default T addReader(Supplier<MessageBodyReader<?>> readerSupplier)
Registers new reader.- Parameters:
readerSupplier
- supplier for a new reader- Returns:
- updated instance of the builder
-
addStreamReader
T addStreamReader(MessageBodyStreamReader<?> streamReader)
Registers new stream reader.- Parameters:
streamReader
- stream reader- Returns:
- updated instance of the builder
-
addStreamReader
default T addStreamReader(Supplier<MessageBodyStreamReader<?>> streamReaderSupplier)
Registers new stream reader.- Parameters:
streamReaderSupplier
- supplier for a new stream reader- Returns:
- updated instance of the builder
-
addWriter
T addWriter(MessageBodyWriter<?> writer)
Registers new writer.- Parameters:
writer
- writer- Returns:
- updated instance of the builder
-
addWriter
default T addWriter(Supplier<MessageBodyWriter<?>> writerSupplier)
Registers new writer.- Parameters:
writerSupplier
- writer- Returns:
- updated instance of the builder
-
addStreamWriter
T addStreamWriter(MessageBodyStreamWriter<?> streamWriter)
Registers new stream writer.- Parameters:
streamWriter
- stream writer- Returns:
- updated instance of the builder
-
addStreamWriter
default T addStreamWriter(Supplier<MessageBodyStreamWriter<?>> streamWriterSupplier)
Registers new stream writer.- Parameters:
streamWriterSupplier
- stream writer- Returns:
- updated instance of the builder
-
-