org.glassfish.jersey.media.sse
Class OutboundEventWriter

java.lang.Object
  extended by org.glassfish.jersey.media.sse.OutboundEventWriter
All Implemented Interfaces:
MessageBodyWriter<OutboundEvent>

public class OutboundEventWriter
extends Object
implements MessageBodyWriter<OutboundEvent>

Writer for OutboundEvent.

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

Constructor Summary
OutboundEventWriter()
           
 
Method Summary
 long getSize(OutboundEvent incomingEvent, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
           
 boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
           
 void writeTo(OutboundEvent outboundEvent, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutboundEventWriter

public OutboundEventWriter()
Method Detail

isWriteable

public boolean isWriteable(Class<?> type,
                           Type genericType,
                           Annotation[] annotations,
                           MediaType mediaType)
Specified by:
isWriteable in interface MessageBodyWriter<OutboundEvent>

getSize

public long getSize(OutboundEvent incomingEvent,
                    Class<?> type,
                    Type genericType,
                    Annotation[] annotations,
                    MediaType mediaType)
Specified by:
getSize in interface MessageBodyWriter<OutboundEvent>

writeTo

public void writeTo(OutboundEvent outboundEvent,
                    Class<?> type,
                    Type genericType,
                    Annotation[] annotations,
                    MediaType mediaType,
                    MultivaluedMap<String,Object> httpHeaders,
                    OutputStream entityStream)
             throws IOException,
                    WebApplicationException
Specified by:
writeTo in interface MessageBodyWriter<OutboundEvent>
Throws:
IOException
WebApplicationException


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.