Class MessageWriter
- java.lang.Object
-
- org.glassfish.jersey.examples.jersey_ejb.entities.MessageWriter
-
- All Implemented Interfaces:
MessageBodyWriter<Message>
@Provider public class MessageWriter extends Object implements MessageBodyWriter<Message>
A simple message body writer to serialize a single message bean.- Author:
- Pavel Bucek
-
-
Constructor Summary
Constructors Constructor Description MessageWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetSize(Message message, Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType)booleanisWriteable(Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType)voidwriteTo(Message message, 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<Message>
-
getSize
public long getSize(Message message, Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType)
- Specified by:
getSizein interfaceMessageBodyWriter<Message>
-
writeTo
public void writeTo(Message message, Class<?> clazz, Type type, Annotation[] annotation, MediaType mediaType, MultivaluedMap<String,Object> arg5, OutputStream ostream) throws IOException, WebApplicationException
- Specified by:
writeToin interfaceMessageBodyWriter<Message>- Throws:
IOExceptionWebApplicationException
-
-