Package org.apache.cxf.jaxrs.sse
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 Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOutboundSseEventBodyWriter(org.apache.cxf.jaxrs.provider.ServerProviderFactory factory, org.apache.cxf.message.Exchange exchange) -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(jakarta.ws.rs.sse.OutboundSseEvent t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt) voidwriteTo(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)
-
Field Details
-
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:
isWriteablein interfacejakarta.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:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<jakarta.ws.rs.sse.OutboundSseEvent>- Throws:
IOExceptionjakarta.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:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<jakarta.ws.rs.sse.OutboundSseEvent>
-