Package org.apache.cxf.jaxrs.sse
Class OutboundSseEventBodyWriter
- java.lang.Object
-
- org.apache.cxf.jaxrs.sse.OutboundSseEventBodyWriter
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.sse.OutboundSseEvent>
@Provider public class OutboundSseEventBodyWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.sse.OutboundSseEvent>
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVER_SENT_EVENTSstatic javax.ws.rs.core.MediaTypeSERVER_SENT_EVENTS_TYPE
-
Constructor Summary
Constructors Modifier Constructor Description protectedOutboundSseEventBodyWriter()OutboundSseEventBodyWriter(ServerProviderFactory factory, Exchange exchange)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetSize(javax.ws.rs.sse.OutboundSseEvent t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)booleanisWriteable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)voidwriteTo(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)
-
-
-
Field Detail
-
SERVER_SENT_EVENTS
public static final String SERVER_SENT_EVENTS
- See Also:
- Constant Field Values
-
SERVER_SENT_EVENTS_TYPE
public static final javax.ws.rs.core.MediaType SERVER_SENT_EVENTS_TYPE
-
-
Constructor Detail
-
OutboundSseEventBodyWriter
protected OutboundSseEventBodyWriter()
-
OutboundSseEventBodyWriter
public OutboundSseEventBodyWriter(ServerProviderFactory factory, Exchange exchange)
-
-
Method Detail
-
isWriteable
public boolean isWriteable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
- Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.sse.OutboundSseEvent>
-
writeTo
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- Specified by:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.sse.OutboundSseEvent>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
getSize
public long getSize(javax.ws.rs.sse.OutboundSseEvent t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)- Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.sse.OutboundSseEvent>
-
-