org.glassfish.jersey.examples.jersey_ejb.entities
Class MessageWriter

java.lang.Object
  extended by org.glassfish.jersey.examples.jersey_ejb.entities.MessageWriter
All Implemented Interfaces:
MessageBodyWriter<Message>

@Provider
public class MessageWriter
extends java.lang.Object
implements MessageBodyWriter<Message>

A simple message body writer to serialize a single message bean.

Author:
Pavel Bucek (pavel.bucek at oracle.com)

Constructor Summary
MessageWriter()
           
 
Method Summary
 long getSize(Message message, java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotation, MediaType mediaType)
           
 boolean isWriteable(java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotation, MediaType mediaType)
           
 void writeTo(Message message, java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotation, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.Object> arg5, java.io.OutputStream ostream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageWriter

public MessageWriter()
Method Detail

isWriteable

public boolean isWriteable(java.lang.Class<?> clazz,
                           java.lang.reflect.Type type,
                           java.lang.annotation.Annotation[] annotation,
                           MediaType mediaType)
Specified by:
isWriteable in interface MessageBodyWriter<Message>

getSize

public long getSize(Message message,
                    java.lang.Class<?> clazz,
                    java.lang.reflect.Type type,
                    java.lang.annotation.Annotation[] annotation,
                    MediaType mediaType)
Specified by:
getSize in interface MessageBodyWriter<Message>

writeTo

public void writeTo(Message message,
                    java.lang.Class<?> clazz,
                    java.lang.reflect.Type type,
                    java.lang.annotation.Annotation[] annotation,
                    MediaType mediaType,
                    MultivaluedMap<java.lang.String,java.lang.Object> arg5,
                    java.io.OutputStream ostream)
             throws java.io.IOException,
                    WebApplicationException
Specified by:
writeTo in interface MessageBodyWriter<Message>
Throws:
java.io.IOException
WebApplicationException


Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.