java.lang.Object
io.helidon.media.jsonb.JsonbSupport
- All Implemented Interfaces:
MediaSupport
Support for JSON-B integration.
For usage examples navigate to the
MediaSupport.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic JsonbSupportcreate()Creates a newJsonbSupport.static JsonbSupportCreates a newJsonbSupport.static MessageBodyStreamWriter<Object>Return a default JSON-B entity event stream writer.static MessageBodyStreamWriter<Object>eventStreamWriter(Jsonb jsonb) Create a new JSON-B entity stream writer based onJsonbinstance.Return JSON-B stream writer instance forMediaType.TEXT_EVENT_STREAMcontent type.static MessageBodyStreamWriter<Object>Return a default JSON-B entity event stream writer.static MessageBodyStreamWriter<Object>ndJsonStreamWriter(Jsonb jsonb) Create a new JSON-B entity stream writer based onJsonbinstance.Return JSON-B stream writer instance forMediaType.APPLICATION_X_NDJSONcontent type.static MessageBodyReader<Object>reader()Return a default JSON-B entity reader.static MessageBodyReader<Object>Create a new JSON-B entity reader based onJsonbinstance.Return JSON-B reader instance.readers()Returns the collection of the readers which should be registered.static MessageBodyStreamWriter<Object>Return a default JSON-B entity stream writer.static MessageBodyStreamWriter<Object>streamWriter(Jsonb jsonb) Create a new JSON-B entity stream writer based onJsonbinstance.Return JSON-B stream writer instance.Returns the collection of the stream writers which should be registered.static MessageBodyWriter<Object>writer()Return a default JSON-B entity writer.static MessageBodyWriter<Object>Create a new JSON-B entity writer based onJsonbinstance.Return JSON-B writer instance.writers()Returns the collection of the writers which should be registered.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.MediaSupport
register, streamReaders
-
Method Details
-
create
Creates a newJsonbSupport.- Returns:
- a new
JsonbSupport
-
create
Creates a newJsonbSupport.- Parameters:
jsonb- the JSON-B to use; must not benull- Returns:
- a new
JsonbSupport - Throws:
NullPointerException- ifjsonbisnull
-
reader
Return a default JSON-B entity reader.- Returns:
- default JSON-B body writer instance
-
reader
Create a new JSON-B entity reader based onJsonbinstance.- Parameters:
jsonb- jsonb instance- Returns:
- new JSON-B body reader instance
-
writer
Return a default JSON-B entity writer.- Returns:
- default JSON-B body writer instance
-
writer
Create a new JSON-B entity writer based onJsonbinstance.- Parameters:
jsonb- jsonb instance- Returns:
- new JSON-B body writer instance
-
streamWriter
Return a default JSON-B entity stream writer.- Returns:
- default JSON-B body writer stream instance
-
streamWriter
Create a new JSON-B entity stream writer based onJsonbinstance.- Parameters:
jsonb- jsonb instance- Returns:
- new JSON-B body stream writer instance
-
eventStreamWriter
Return a default JSON-B entity event stream writer. This writer is forMediaType.TEXT_EVENT_STREAMcontent type.- Returns:
- new JSON-B body stream writer instance
-
eventStreamWriter
Create a new JSON-B entity stream writer based onJsonbinstance. This writer is forMediaType.TEXT_EVENT_STREAMcontent type.- Parameters:
jsonb- jsonb instance- Returns:
- new JSON-B body stream writer instance
-
ndJsonStreamWriter
Return a default JSON-B entity event stream writer. This writer is forMediaType.APPLICATION_X_NDJSONcontent type.- Returns:
- new JSON-B body stream writer instance
-
ndJsonStreamWriter
Create a new JSON-B entity stream writer based onJsonbinstance. This writer is forMediaType.APPLICATION_X_NDJSONcontent type.- Parameters:
jsonb- jsonb instance- Returns:
- new JSON-B body stream writer instance
-
readerInstance
Return JSON-B reader instance.- Returns:
- JSON-B reader instance
-
writerInstance
Return JSON-B writer instance.- Returns:
- JSON-B writer instance
-
streamWriterInstance
Return JSON-B stream writer instance.- Returns:
- JSON-B stream writer instance
-
eventStreamWriterInstance
Return JSON-B stream writer instance forMediaType.TEXT_EVENT_STREAMcontent type.- Returns:
- JSON-B event stream writer instance
-
ndJsonStreamWriterInstance
Return JSON-B stream writer instance forMediaType.APPLICATION_X_NDJSONcontent type.- Returns:
- JSON-B event stream writer instance
-
readers
Description copied from interface:MediaSupportReturns the collection of the readers which should be registered.- Specified by:
readersin interfaceMediaSupport- Returns:
- readers
-
writers
Description copied from interface:MediaSupportReturns the collection of the writers which should be registered.- Specified by:
writersin interfaceMediaSupport- Returns:
- writers
-
streamWriters
Description copied from interface:MediaSupportReturns the collection of the stream writers which should be registered.- Specified by:
streamWritersin interfaceMediaSupport- Returns:
- stream writers
-