- java.lang.Object
-
- io.helidon.media.jsonp.common.JsonpBodyReader
-
- All Implemented Interfaces:
MessageBodyOperator<MessageBodyReaderContext>,MessageBodyReader<javax.json.JsonStructure>
public final class JsonpBodyReader extends Object implements MessageBodyReader<javax.json.JsonStructure>
Message body reader forJsonStructuresub-classes (JSON-P).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(GenericType<?> type, MessageBodyReaderContext context)Test if the operator can convert the given type.<U extends javax.json.JsonStructure>
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 extends javax.json.JsonStructure> 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<javax.json.JsonStructure>- Type Parameters:
U- actual requested type parameter- Parameters:
publisher- HTTP payloadtype- requested typecontext- the context providing the headers abstraction- Returns:
- Single publisher
-
-