java.lang.Object
io.helidon.media.multipart.MultiPartBodyWriter
- All Implemented Interfaces:
MessageBodyOperator<MessageBodyWriterContext>,MessageBodyWriter<WriteableMultiPart>
public final class MultiPartBodyWriter
extends Object
implements MessageBodyWriter<WriteableMultiPart>
WriteableMultiPart writer.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.media.common.MessageBodyOperator
MessageBodyOperator.PredicateResult -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default boundary used for encoding multipart messages. -
Method Summary
Modifier and TypeMethodDescriptionaccept(GenericType<?> type, MessageBodyWriterContext context) Test if the operator can convert the given type.static MultiPartBodyWritercreate()Create a new writer instance that uses the default boundary delimiter.static MultiPartBodyWriterCreate a new instance ofMultiPartBodyWriterwith the specified boundary delimiter.write(Single<? extends WriteableMultiPart> content, GenericType<? extends WriteableMultiPart> type, MessageBodyWriterContext context) Generate HTTP payload from the objects of the given type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.media.common.MessageBodyWriter
marshall
-
Field Details
-
DEFAULT_BOUNDARY
The default boundary used for encoding multipart messages.- See Also:
-
-
Method Details
-
accept
public MessageBodyOperator.PredicateResult 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:
MessageBodyOperator.PredicateResultresult
-
write
public Flow.Publisher<DataChunk> write(Single<? extends WriteableMultiPart> content, GenericType<? extends WriteableMultiPart> type, MessageBodyWriterContext context) Description copied from interface:MessageBodyWriterGenerate HTTP payload from the objects of the given type.- Specified by:
writein interfaceMessageBodyWriter<WriteableMultiPart>- Parameters:
content- object single publisher to convert to payloadtype- requested typecontext- the context providing the headers abstraction- Returns:
- Publisher of objects
-
create
Create a new instance ofMultiPartBodyWriterwith the specified boundary delimiter.- Parameters:
boundary- boundary string- Returns:
- MultiPartWriter
-
create
Create a new writer instance that uses the default boundary delimiter.- Returns:
- MultiPartWriter
- See Also:
-