@Provider public class OutboundSseEventBodyWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.sse.OutboundSseEvent>
Modifier and Type | Field and Description |
---|---|
static String |
SERVER_SENT_EVENTS |
static javax.ws.rs.core.MediaType |
SERVER_SENT_EVENTS_TYPE |
Modifier | Constructor and Description |
---|---|
protected |
OutboundSseEventBodyWriter() |
|
OutboundSseEventBodyWriter(ServerProviderFactory factory,
Exchange exchange) |
Modifier and Type | Method and Description |
---|---|
long |
getSize(javax.ws.rs.sse.OutboundSseEvent t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
void |
writeTo(javax.ws.rs.sse.OutboundSseEvent p,
Class<?> cls,
Type t,
Annotation[] anns,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os) |
public static final String SERVER_SENT_EVENTS
public static final javax.ws.rs.core.MediaType SERVER_SENT_EVENTS_TYPE
protected OutboundSseEventBodyWriter()
public OutboundSseEventBodyWriter(ServerProviderFactory factory, Exchange exchange)
public boolean isWriteable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.sse.OutboundSseEvent>
public void writeTo(javax.ws.rs.sse.OutboundSseEvent p, Class<?> cls, Type t, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException, javax.ws.rs.WebApplicationException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.sse.OutboundSseEvent>
IOException
javax.ws.rs.WebApplicationException
public long getSize(javax.ws.rs.sse.OutboundSseEvent t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.sse.OutboundSseEvent>
Apache CXF