-
- Type Parameters:
T
- type or base type supported by the operator
- All Superinterfaces:
MessageBodyOperator<MessageBodyReaderContext>
- All Known Implementing Classes:
MultiPartBodyReader
public interface MessageBodyReader<T> extends MessageBodyOperator<MessageBodyReaderContext>
Conversion operator that can convert HTTP payload into one object.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.helidon.media.common.MessageBodyOperator
MessageBodyOperator.PredicateResult
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <U extends T>
Single<U>read(Flow.Publisher<DataChunk> publisher, GenericType<U> type, MessageBodyReaderContext context)
Convert a HTTP payload into a Single publisher of the given type.default Single<T>
unmarshall(MessageBodyReadableContent content, GenericType<T> type)
Unmarshall the given content using this reader.default Single<T>
unmarshall(MessageBodyReadableContent content, Class<T> type)
Unmarshall the given content using this reader.-
Methods inherited from interface io.helidon.media.common.MessageBodyOperator
accept
-
-
-
-
Method Detail
-
read
<U extends T> Single<U> read(Flow.Publisher<DataChunk> publisher, GenericType<U> type, MessageBodyReaderContext context)
Convert a HTTP payload into a Single publisher of the given type.- Type Parameters:
U
- actual requested type parameter- Parameters:
publisher
- HTTP payloadtype
- requested typecontext
- the context providing the headers abstraction- Returns:
- Single publisher
-
unmarshall
default Single<T> unmarshall(MessageBodyReadableContent content, GenericType<T> type)
Unmarshall the given content using this reader.- Parameters:
content
- readable content to unmarshalltype
- requested type- Returns:
- Single publisher
-
unmarshall
default Single<T> unmarshall(MessageBodyReadableContent content, Class<T> type)
Unmarshall the given content using this reader.- Parameters:
content
- readable content to unmarshalltype
- requested type- Returns:
- Single publisher
-
-