Class JsrJsonpProvider
java.lang.Object
org.apache.cxf.jaxrs.provider.jsrjsonp.JsrJsonpProvider
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<jakarta.json.JsonStructure>,jakarta.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonStructure>
@Produces({"application/json","application/*+json"})
@Consumes({"application/json","application/*+json"})
@Provider
public class JsrJsonpProvider
extends Object
implements jakarta.ws.rs.ext.MessageBodyReader<jakarta.json.JsonStructure>, jakarta.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonStructure>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(jakarta.json.JsonStructure t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) booleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) jakarta.json.JsonStructurereadFrom(Class<jakarta.json.JsonStructure> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) voidwriteTo(jakarta.json.JsonStructure t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Constructor Details
-
JsrJsonpProvider
public JsrJsonpProvider()
-
-
Method Details
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonStructure>
-
getSize
public long getSize(jakarta.json.JsonStructure t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonStructure>
-
writeTo
public void writeTo(jakarta.json.JsonStructure t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<jakarta.json.JsonStructure>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isReadablein interfacejakarta.ws.rs.ext.MessageBodyReader<jakarta.json.JsonStructure>
-
readFrom
public jakarta.json.JsonStructure readFrom(Class<jakarta.json.JsonStructure> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
readFromin interfacejakarta.ws.rs.ext.MessageBodyReader<jakarta.json.JsonStructure>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-