- java.lang.Object
-
- org.glassfish.json.jaxrs.JsonValueBodyWriter
-
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonValue>
@Provider @Produces({"application/json","text/json","*/*"}) public class JsonValueBodyWriter extends Object implements jakarta.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonValue>Jakarta RESTful Web Services MessageBodyWriter for JsonValue. This allows JsonValue to be return type of a resource method.- Author:
- Jitendra Kotamraju, Blaise Doughan, Michal Gajdos
-
-
Constructor Summary
Constructors Constructor Description JsonValueBodyWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetSize(jakarta.json.JsonValue jsonValue, Class<?> aClass, Type type, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)booleanisWriteable(Class<?> aClass, Type type, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)voidwriteTo(jakarta.json.JsonValue jsonValue, Class<?> aClass, Type type, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> stringObjectMultivaluedMap, OutputStream outputStream)
-
-
-
Method Detail
-
isWriteable
public boolean isWriteable(Class<?> aClass, Type type, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonValue>
-
getSize
public long getSize(jakarta.json.JsonValue jsonValue, Class<?> aClass, Type type, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)- Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonValue>
-
writeTo
public void writeTo(jakarta.json.JsonValue jsonValue, Class<?> aClass, Type type, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> stringObjectMultivaluedMap, OutputStream outputStream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonValue>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-
-