| CARVIEW |
Select Language
HTTP/2 301
date: Sun, 18 Jan 2026 15:17:32 GMT
content-type: text/html; charset=iso-8859-1
location: https://doc.akkasource.org/comet
server: cloudflare
host-header: 6b7412fb82ca5edfd0917e3957f05d89
x-proxy-cache: MISS
x-proxy-cache-info: 0301 NC:000000 UP:
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=uA3IYHCLlN%2BbXGcMrVThEj5Nms8SBMG9llFpfLHWGtIIcxK6COrqPRePLuAmFehfLjOG9lkwx0m5Kd75adUYWN8AWv193wwnSjYvkokahqvb7g%3D%3D"}]}
cf-ray: 9bff0f45f8f1ff6e-BOM
alt-svc: h3=":443"; ma=86400
HTTP/1.1 200 OK
Date: Sun, 18 Jan 2026 15:17:32 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: cloudflare
Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
Vary: Accept-Encoding
X-Httpd: 1
Host-Header: 6b7412fb82ca5edfd0917e3957f05d89
X-Proxy-Cache: MISS
X-Proxy-Cache-Info: 0 NC:000000 UP:
Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=X9DE%2BPHXZWTMzuIqyKgUUjd0LTq6oErgZXObbXp7th8pcGltv7mT36piez30VK5XY1kxjEhU7FQC7ygvfPVh%2Bspwgrh4iauUblS6znpb3WuvyQ%3D%3D"}]}
cf-cache-status: DYNAMIC
Content-Encoding: gzip
CF-RAY: 9bff0f4d1f2cff69-BOM
alt-svc: h3=":443"; ma=86400
akka - comet
Home
Download
Getting Started
Build & run Akka
Documentation
Project Info
- Source Code
- Maven Repository
- Team
- Issue Tracking
- Mailing List
- License
- Release Notes
- Developer Guidelines
- Sponsors
- Commercial Support
Join this Wiki-
Recent Changes
-
Manage Wiki
Protected
Module stability: IN PROGRESS
Akka supports push/streaming REST/AJAX using the Atmosphere framework, which works together with JAX-RSannotations to provide streaming RESTful components.
In order to turn the REST beans into Comet services you have to annotate them with the Atmosphere annotations (along with the JAX-RS annotations):
If you deploy Akka in another JEE container, don't forget to add Akkas initialization and cleanup hook:
If you deploy Akka in another container and you get a comet support detection problem and you have 'se.scalablesolutions.akka.comet.AkkaServlet' in your 'web.xml' you can simply provide it with an 'init-param' to specify which comet support you want to use:
Options:
Here is a little example of creating a comet-based publish/subscribe REST-bean.
| Details |
last edit by |
|
|---|---|---|
| Tags |
Comet - Streaming AJAX
Module stability: IN PROGRESS
Akka supports push/streaming REST/AJAX using the Atmosphere framework, which works together with JAX-RSannotations to provide streaming RESTful components.
In order to turn the REST beans into Comet services you have to annotate them with the Atmosphere annotations (along with the JAX-RS annotations):
- @Suspend
Annotate an endpoint method with @Suspend, and any incoming requests to this endpoint will be listening for Broadcasted messages on the specified entity.
- @Broadcast
Annotate another endpoint method with @Broadcast on the same entity and have the result of the method propagated to all listeners for this entity.
- @Cluster(Array(classOf[AkkaClusterBroadcastFilter])) { val name = "uniquename" }
Annotate the same endpoint as @Broadcast and give it a unique name, and now your comet app is cluster aware
If you deploy Akka in another JEE container, don't forget to add Akkas initialization and cleanup hook:
<web-app> ... <listener> <listener-class>se.scalablesolutions.akka.servlet.Initializer</listener-class> </listener> ... </web-app>
If you deploy Akka in another container and you get a comet support detection problem and you have 'se.scalablesolutions.akka.comet.AkkaServlet' in your 'web.xml' you can simply provide it with an 'init-param' to specify which comet support you want to use:
<servlet> ... <init-param> <param-name>cometSupport</param-name> <param-value>org.atmosphere.container.CLASS_GOES_HERE</param-value> </init-param> ... </servlet>
Options:
- BlockingIOCometSupport
- GoogleAppEngineCometSupport
- GrizzlyCometSupport
- JBossWebCometSupport
- Jetty7CometSupport
- JettyCometSupport
- Servlet30Support
- TomcatCometSupport
- WebLogicCometSupport
Here is a little example of creating a comet-based publish/subscribe REST-bean.
@Path("/pubsub/") @Produces(Array("text/plain;charset=ISO-8859-1")) class PubSub { @GET @Suspend @Path("/topic/{topic}/") def subscribe(@PathParam("topic") Broadcaster topic) : Broadcastable = new Broadcastable("", topic) @GET @Broadcast @Path("/topic/{topic}/{message}/") @Cluster(Array(classOf[AkkaClusterBroadcastFilter])) { val name = "foo" } def say(@PathParam("topic") Broadcaster topic, @PathParam("message") message: String): Broadcastable = new Broadcastable(message, topic) }
Copyright 2009-2010 - Scalable Solutions AB

