- java.lang.Object
-
- io.helidon.media.jsonb.common.JsonbBodyReader
-
- All Implemented Interfaces:
MessageBodyOperator<MessageBodyReaderContext>,MessageBodyReader<Object>
public class JsonbBodyReader extends Object implements MessageBodyReader<Object>
Message body writer supporting object binding with JSON-B.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(GenericType<?> type, MessageBodyReaderContext context)Test if the operator can convert the given type.static JsonbBodyReadercreate(javax.json.bind.Jsonb jsonb)Create a newJsonbBodyReaderinstance.<U> 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 boolean accept(GenericType<?> type, MessageBodyReaderContext context)
Description copied from interface:MessageBodyOperatorTest if the operator can convert the given type.- Specified by:
acceptin interfaceMessageBodyOperator<MessageBodyReaderContext>- 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
-
read
public <U> 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<Object>- 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 JsonbBodyReader create(javax.json.bind.Jsonb jsonb)
Create a newJsonbBodyReaderinstance.- Parameters:
jsonb- JSON-B instance- Returns:
- JsonbBodyReader
-
-