Module xorcery.jsonapi.jaxrs
Class JsonElementMessageBodyReader
Object
JsonElementMessageBodyReader
- All Implemented Interfaces:
MessageBodyReader<JsonElement>
@Singleton
@Provider
@Consumes("application/vnd.api+json")
public class JsonElementMessageBodyReader
extends Object
implements MessageBodyReader<JsonElement>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isReadable
(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) readFrom
(Class<JsonElement> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
-
Constructor Details
-
JsonElementMessageBodyReader
public JsonElementMessageBodyReader()
-
-
Method Details
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) - Specified by:
isReadable
in interfaceMessageBodyReader<JsonElement>
-
readFrom
public JsonElement readFrom(Class<JsonElement> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, WebApplicationException- Specified by:
readFrom
in interfaceMessageBodyReader<JsonElement>
- Throws:
IOException
WebApplicationException
-