java.lang.Object
org.apache.johnzon.jaxrs.IgnorableTypes
org.apache.johnzon.jaxrs.JohnzonMessageBodyWriter<T>
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<T>
@Produces({"application/json","*/json","*/*+json","*/x-json","*/javascript","*/x-javascript"})
public class JohnzonMessageBodyWriter<T>
extends IgnorableTypes
implements jakarta.ws.rs.ext.MessageBodyWriter<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJohnzonMessageBodyWriter(org.apache.johnzon.mapper.Mapper mapper, Collection<String> ignoredTypes) -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(T t, Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) voidwriteTo(T t, Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) Methods inherited from class org.apache.johnzon.jaxrs.IgnorableTypes
isIgnored
-
Field Details
-
mapper
private final org.apache.johnzon.mapper.Mapper mapper
-
-
Constructor Details
-
JohnzonMessageBodyWriter
public JohnzonMessageBodyWriter() -
JohnzonMessageBodyWriter
public JohnzonMessageBodyWriter(org.apache.johnzon.mapper.Mapper mapper, Collection<String> ignoredTypes)
-
-
Method Details
-
getSize
public long getSize(T t, Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<T>
-
isWriteable
public boolean isWriteable(Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<T>
-
writeTo
public void writeTo(T t, Class<?> rawType, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException- Specified by:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<T>- Throws:
IOException
-