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 java.lang.Object
implements MessageBodyWriter<OutboundEvent>

Writer for OutboundEvent.

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

Constructor Summary
OutboundEventWriter()
           
 
Method Summary
 long getSize(OutboundEvent incomingEvent, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)
           
 boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)
           
 void writeTo(OutboundEvent outboundEvent, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.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(java.lang.Class<?> type,
                           java.lang.reflect.Type genericType,
                           java.lang.annotation.Annotation[] annotations,
                           MediaType mediaType)
Specified by:
isWriteable in interface MessageBodyWriter<OutboundEvent>

getSize

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

writeTo

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


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