Class OutboundSseEventBodyWriter

java.lang.Object
org.apache.cxf.jaxrs.sse.OutboundSseEventBodyWriter
All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<jakarta.ws.rs.sse.OutboundSseEvent>

@Provider public class OutboundSseEventBodyWriter extends Object implements jakarta.ws.rs.ext.MessageBodyWriter<jakarta.ws.rs.sse.OutboundSseEvent>
  • Field Details

    • SERVER_SENT_EVENTS

      public static final String SERVER_SENT_EVENTS
      See Also:
    • SERVER_SENT_EVENTS_TYPE

      public static final jakarta.ws.rs.core.MediaType SERVER_SENT_EVENTS_TYPE
  • Constructor Details

    • OutboundSseEventBodyWriter

      protected OutboundSseEventBodyWriter()
    • OutboundSseEventBodyWriter

      public OutboundSseEventBodyWriter(org.apache.cxf.jaxrs.provider.ServerProviderFactory factory, org.apache.cxf.message.Exchange exchange)
  • Method Details

    • isWriteable

      public boolean isWriteable(Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt)
      Specified by:
      isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<jakarta.ws.rs.sse.OutboundSseEvent>
    • writeTo

      public void writeTo(jakarta.ws.rs.sse.OutboundSseEvent p, Class<?> cls, Type t, Annotation[] anns, jakarta.ws.rs.core.MediaType mt, jakarta.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException, jakarta.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<jakarta.ws.rs.sse.OutboundSseEvent>
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException
    • getSize

      public long getSize(jakarta.ws.rs.sse.OutboundSseEvent t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface jakarta.ws.rs.ext.MessageBodyWriter<jakarta.ws.rs.sse.OutboundSseEvent>