- java.lang.Object
-
- io.helidon.media.multipart.MultiPartBodyReader
-
- All Implemented Interfaces:
MessageBodyOperator<MessageBodyReaderContext>,MessageBodyReader<MultiPart>
public final class MultiPartBodyReader extends Object implements MessageBodyReader<MultiPart>
ReadableMultiPartreader.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.helidon.media.common.MessageBodyOperator
MessageBodyOperator.PredicateResult
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageBodyOperator.PredicateResultaccept(GenericType<?> type, MessageBodyReaderContext ctx)Test if the operator can convert the given type.static MultiPartBodyReadercreate()Create a new instance ofMultiPartBodyReader.<U extends MultiPart>
Single<U>read(Flow.Publisher<DataChunk> publisher, GenericType<U> type, MessageBodyReaderContext context)Convert a HTTP payload into a Single publisher of the given type.
-
-
-
Method Detail
-
accept
public MessageBodyOperator.PredicateResult accept(GenericType<?> type, MessageBodyReaderContext ctx)
Description copied from interface:MessageBodyOperatorTest if the operator can convert the given type.- Specified by:
acceptin interfaceMessageBodyOperator<MessageBodyReaderContext>- Parameters:
type- the requested typectx- the context providing the headers abstraction- Returns:
MessageBodyOperator.PredicateResultresult
-
read
public <U extends MultiPart> Single<U> read(Flow.Publisher<DataChunk> publisher, GenericType<U> type, MessageBodyReaderContext context)
Description copied from interface:MessageBodyReaderConvert a HTTP payload into a Single publisher of the given type.- Specified by:
readin interfaceMessageBodyReader<MultiPart>- Type Parameters:
U- actual requested type parameter- Parameters:
publisher- HTTP payloadtype- requested typecontext- the context providing the headers abstraction- Returns:
- Single publisher
-
create
public static MultiPartBodyReader create()
Create a new instance ofMultiPartBodyReader.- Returns:
- MultiPartReader
-
-