Package com.ibm.fhir.provider
Class FHIRJsonProvider
- java.lang.Object
-
- com.ibm.fhir.provider.FHIRJsonProvider
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<jakarta.json.JsonObject>
,javax.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonObject>
@Consumes({"application/fhir+json","application/json"}) @Produces({"application/fhir+json","application/json"}) public class FHIRJsonProvider extends Object implements javax.ws.rs.ext.MessageBodyReader<jakarta.json.JsonObject>, javax.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonObject>
Maps entity streams to/from jakarta.json objects
-
-
Constructor Summary
Constructors Constructor Description FHIRJsonProvider(javax.ws.rs.RuntimeType runtimeType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getSize(jakarta.json.JsonObject t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
boolean
isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
boolean
isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
jakarta.json.JsonObject
readFrom(Class<jakarta.json.JsonObject> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)
void
writeTo(jakarta.json.JsonObject t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
-
-
Method Detail
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable
in interfacejavax.ws.rs.ext.MessageBodyReader<jakarta.json.JsonObject>
-
readFrom
public jakarta.json.JsonObject readFrom(Class<jakarta.json.JsonObject> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
readFrom
in interfacejavax.ws.rs.ext.MessageBodyReader<jakarta.json.JsonObject>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonObject>
-
writeTo
public void writeTo(jakarta.json.JsonObject t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonObject>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
getSize
public long getSize(jakarta.json.JsonObject t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonObject>
-
-