Class MessageListWriter
java.lang.Object
org.glassfish.jersey.examples.jersey_ejb.entities.MessageListWriter
- All Implemented Interfaces:
MessageBodyWriter<List<Message>>
A simple HTML message body writer to serialize list of message beans.
- Author:
- Pavel Bucek
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(List<Message> messages, Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType) booleanisWriteable(Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType) voidwriteTo(List<Message> messages, Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType, MultivaluedMap<String, Object> arg5, OutputStream ostream)
-
Constructor Details
-
MessageListWriter
public MessageListWriter()
-
-
Method Details
-
isWriteable
- Specified by:
isWriteablein interfaceMessageBodyWriter<List<Message>>
-
getSize
public long getSize(List<Message> messages, Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType) - Specified by:
getSizein interfaceMessageBodyWriter<List<Message>>
-
writeTo
public void writeTo(List<Message> messages, Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType, MultivaluedMap<String, Object> arg5, OutputStream ostream) throws IOException, WebApplicationException- Specified by:
writeToin interfaceMessageBodyWriter<List<Message>>- Throws:
IOExceptionWebApplicationException
-