...
Code Block | ||||
---|---|---|---|---|
| ||||
final JAXRSServerFactoryBean factory = RuntimeDelegate.getInstance().createEndpoint(<application>, JAXRSServerFactoryBean.class); factory.setFeatures(Arrays.asList(new SseFeature())); ... return factory.create(); |
Additional Properties
There are a couple of contextual properties which allow to fine-tune the Apache CXF SSE implementation to a particular context.
Property | Description | Default |
---|---|---|
org.apache.cxf.sse.sink.buffer.size | By default, the SSE events are scheduled in batches and than flushed one by one. | 10000 |
OSGi
For the deployments inside OSGi containers (like Apache Karaf), Apache CXF provides a dedicated cxf-sse feature (which depends on cxf-http and cxf-jaxrs).
...