Class 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 java.lang.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, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      boolean isReadable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      boolean isWriteable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      jakarta.json.JsonObject readFrom​(java.lang.Class<jakarta.json.JsonObject> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> httpHeaders, java.io.InputStream entityStream)  
      void writeTo​(jakarta.json.JsonObject t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> httpHeaders, java.io.OutputStream entityStream)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FHIRJsonProvider

        public FHIRJsonProvider​(javax.ws.rs.RuntimeType runtimeType)
    • Method Detail

      • isReadable

        public boolean isReadable​(java.lang.Class<?> type,
                                  java.lang.reflect.Type genericType,
                                  java.lang.annotation.Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<jakarta.json.JsonObject>
      • readFrom

        public jakarta.json.JsonObject readFrom​(java.lang.Class<jakarta.json.JsonObject> type,
                                                java.lang.reflect.Type genericType,
                                                java.lang.annotation.Annotation[] annotations,
                                                javax.ws.rs.core.MediaType mediaType,
                                                javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> httpHeaders,
                                                java.io.InputStream entityStream)
                                         throws java.io.IOException,
                                                javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<jakarta.json.JsonObject>
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException
      • isWriteable

        public boolean isWriteable​(java.lang.Class<?> type,
                                   java.lang.reflect.Type genericType,
                                   java.lang.annotation.Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonObject>
      • writeTo

        public void writeTo​(jakarta.json.JsonObject t,
                            java.lang.Class<?> type,
                            java.lang.reflect.Type genericType,
                            java.lang.annotation.Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> httpHeaders,
                            java.io.OutputStream entityStream)
                     throws java.io.IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonObject>
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException
      • getSize

        public long getSize​(jakarta.json.JsonObject t,
                            java.lang.Class<?> type,
                            java.lang.reflect.Type genericType,
                            java.lang.annotation.Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType)
        Specified by:
        getSize in interface javax.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonObject>