Class MessageListWriter
- java.lang.Object
-
- org.glassfish.jersey.examples.jersey_ejb.entities.MessageListWriter
-
- All Implemented Interfaces:
MessageBodyWriter<List<Message>>
@Provider public class MessageListWriter extends Object implements MessageBodyWriter<List<Message>>
A simple HTML message body writer to serialize list of message beans.- Author:
- Pavel Bucek
-
-
Constructor Summary
Constructors Constructor Description MessageListWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetSize(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)
-
-
-
Method Detail
-
isWriteable
public boolean isWriteable(Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType)
- 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
-
-