T - The entity type to handleU - The response type to producepublic abstract class ErrorEntityWriter<T,U> extends Object implements javax.ws.rs.ext.MessageBodyWriter<T>
ErrorMessage entity and the TEXT_HTML MediaType to produce custom HTML error messages.| Constructor and Description |
|---|
ErrorEntityWriter(javax.ws.rs.core.MediaType contentType,
Class<U> representation) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract U |
getRepresentation(T entity) |
long |
getSize(T entity,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
void |
writeTo(T entity,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> responseHeaders,
OutputStream entityStream) |
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<T>public long getSize(T entity, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize in interface javax.ws.rs.ext.MessageBodyWriter<T>public void writeTo(T entity, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> responseHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<T>IOExceptionjavax.ws.rs.WebApplicationExceptionCopyright © 2021. All rights reserved.