- java.lang.Object
-
- io.helidon.media.common.ByteChannelBodyWriter
-
- All Implemented Interfaces:
MessageBodyOperator<MessageBodyWriterContext>,MessageBodyWriter<ReadableByteChannel>
public final class ByteChannelBodyWriter extends Object implements MessageBodyWriter<ReadableByteChannel>
Message body writer forReadableByteChannel.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(GenericType<?> type, MessageBodyWriterContext context)Test if the operator can convert the given type.static ByteChannelBodyWritercreate()Create a new instance ofByteChannelBodyWriter.static ByteChannelBodyWritercreate(RetrySchema schema)Create a new instance ofByteChannelBodyWriterwith the givenRetrySchema.Flow.Publisher<DataChunk>write(Single<ReadableByteChannel> content, GenericType<? extends ReadableByteChannel> type, MessageBodyWriterContext context)Generate HTTP payload from the objects of the given type.
-
-
-
Method Detail
-
accept
public boolean accept(GenericType<?> type, MessageBodyWriterContext context)
Description copied from interface:MessageBodyOperatorTest if the operator can convert the given type.- Specified by:
acceptin interfaceMessageBodyOperator<MessageBodyWriterContext>- Parameters:
type- the requested typecontext- the context providing the headers abstraction- Returns:
trueif the operator can convert the specified type in the given context,falseotherwise
-
write
public Flow.Publisher<DataChunk> write(Single<ReadableByteChannel> content, GenericType<? extends ReadableByteChannel> type, MessageBodyWriterContext context)
Description copied from interface:MessageBodyWriterGenerate HTTP payload from the objects of the given type.- Specified by:
writein interfaceMessageBodyWriter<ReadableByteChannel>- Parameters:
content- object single publisher to convert to payloadtype- requested typecontext- the context providing the headers abstraction- Returns:
- Publisher of objects
-
create
public static ByteChannelBodyWriter create(RetrySchema schema)
Create a new instance ofByteChannelBodyWriterwith the givenRetrySchema.- Parameters:
schema- retry schema- Returns:
ReadableByteChannelmessage body writer
-
create
public static ByteChannelBodyWriter create()
Create a new instance ofByteChannelBodyWriter.- Returns:
ReadableByteChannelmessage body writer
-
-