Skip to content
This repository

The table below describes every Atmosphere's sample by defining the server and client API used to build it. You can download the sample by clicking on its name.

Recommended samples for getting started are the chat, which demonstrate usage of all transports using an AtmosphereHandler, or the jquery-pubsub, which demonstrate how to switch from one transport to another using a Jersey Resources. If you are interested to write WebSocket only application, take a look at the atmosphere-websockethandler-pubsub sample. The pubsub sample contains a lot of small demonstration on how the Jersey extension can be used. If you are interested to write HTML5 Server Side Events application, take a look at the atmosphere-sse-xxx samples.

If you plan to use Spring or GWT, take a look at their specific samples.

All sample supports WebSocket and Long Polling by default. Streaming and JSONP are supported by the majority of pubsub samples. If you are interested to write HTML5 Server Side Events application, take a look at the atmosphere-sse-xxx samples.

Sample Name Description Server Components Client Components
all-api-pubsub This sample implements a pubsub example that demonstrates all Atmosphere's API and extension. The use of AtmosphereResource, Meteor, Annotation like @Suspend and @Broadcast are demonstrated AtmosphereHandler Jersey Resource Meteor WebSocketProtocol Single Callback supporting WebSocket, Long-Polling, JSONP, Http-Streaming
async-annotation-pubsub This sample demonstrates the use of the @Asynchronous annotation combined with the Callable<?> API, showing how an application can be fully asynchronous in its execution. The sample implements the pubsub concepts. Jersey Resource Single Callback supporting WebSocket, Long-Polling, JSONP, Http-Streaming
atmosphere-ee6 This sample demonstrates the use of @Suspend with Java EE's 6 annotation like @Resource and EJB Timer Jersey Resource Http-Streaming
channel This sample demonstrate the use of @Subscribe and @Publish annotation using a pub sub application. If you are migrating from CometD, this sample is for you. Jersey Resource
chat-guice This sample demonstrate the use of Google Guice with Atmosphere. The Chat application is implemented using @Suspend and @Broadcast annotation Guice Jersey Resource Javascript Functions demonstrating WebSocket, falling back to Long-Polling
chat This sample demonstrates the use of WebSocket (falling back to Long-Polling) using a simple AtmosphereHandler. The sample also demonstrates how to detect which transport are supported by the client and server by negotiating with the server. AtmosphereHandler Javascript Functions demonstrating WebSocket, falling back to Long-Polling. Code demonstrating how to negotiate with the server demonstrated as well
di-guice-sample The sample demonstrates the use of Atmosphere's Dependencies Injection using Guice Jersey Resource Guice Javascript Callback
gwt-demo This samples demonstrates the use of the Atmosphere GWT extension. To start type "mvn gwt:run" GWT GWT
gwt-jsdemo This sample demonstrates the use of the GWT Javascript client GWT GWT Javascript Library
gwt-chat This sample demonstrates the use of the GWT Javascript client to create multiple chatrooms. It shows how to use the connection url and broadcasters to seperate messages into different communication channels. To start type "mvn gwt:run" ChatHandler (AtmosphereGwtHandler) GWT Chat Code
gwt-conn-share This sample demonstrates the use of the AtmosphereProxy on the client. It is an intelligent wrapper for the AtmosphereClient connection that is able to share the connection between multiple windows. It detects this automatically and is able to detect when a window is closed and the master connection needs to be reestablished from another window. All incoming and outgoing events are bubbled to all the client windows. Outgoing events are routed to the correct window that has the master connection. It is also possible to broadcast messages locally, which means the message gets send to all the client windows, but not to the server. To start type "mvn gwt:run" AtmosphereGwtHandler GWT Code
jquery-atmospherehandler-pubsub This sample demonstrate the use of AtmosphereHandler for implementing a pub sub application. The sample supports Long-Polling, Http Streaming and WebSocket AtmosphereHandler Javascript Function
atmosphere-meteor-pubsub This sample demonstrate the use of the Meteor API, from a Servlet, for implementing a pub sub application. The sample supports Long-Polling, Http Streaming and WebSocket Meteor Javascript Function
jquery-multirequest This sample demonstrates how multi requests can be made using the jQuery.atmosphere.js. The sample implements the pub sub application. Jersey Resource/td> Per Request and Global callback
jquery-pubsub This sample demonstrates all transports (WebSockets, Server Side Events, Long-Polling, Http Streaming and JSONP using a super simple Jersey Resource. The sample implements a pub sub application. Jersey Resource Javascript Function
jquery-websockethandler-pubsub This sample demonstrates how to write WebSocket only application WebSocketHandler Javascript Funtion
jquery-pubsub This sample demonstrates a lot of server side functionality like broadcast/suspend/resume using a Jersey Resource. Jersey Resource
meteor-pubsub This sample demonstrates of the Meteor API, from a Servlet, can be used to implement a chat application Meteor Javascript Function
rest-chat This sample demonstrates the use of a Jersey Resource for implementing a chat application Jersey Resource Javascript Function
scala-chat This sample demonstrates how to use Scala to write a chat application Scala Resource Javascript Function
spring-tiles This sample demonstrates how to use the Spring and Tiles Framework with AtmosphereHandler. The sample implements a pubsub application Spring Controller Javascript Function
spring-websocket This sample demonstrates the use of Spring with Atmosphere WebSocketHandler, Meteor and AtmosphereHandler Meteor Service WebSocketProtocol Spring View
sse-chat This sample demonstrates how to use HTML 5 Server Sides Events to build a chat application using an AtmosphereHandler AtmosphereHandler Javascript Function
sse-rest-chat This sample demonstrates how to use HTML 5 Server Sides Events to build a chat application using a Jersey Resource Jersey Resource Javascript Function
twitter-live-feed This sample demonstrates how to use jQuery.atmosphere.js to implements a real time Twitter Search using a simple Jersey Resource. It also demonstrate how BroadcastFilter can be used to mark to handle large set of data to send back to the client Jersey Resource JavaScript Function
twitter-live-feed This sample demonstrates how to use jQuery.atmosphere.js to implements a real time Twitter Search using a simple Jersey Resource. It also demonstrate how BroadcastFilter can be used to mark to handle large set of data to send back to the client Jersey Resource JavaScript Function
socketio-chat This sample demonstrates how the SocketIO library can be used, transparently, using an AtmosphereHandler AtmosphereHandler SocketIO
native-socketio-chat This sample demonstrates how the SocketIO library and natively extending the SocketIO protocol on the server side AtmosphereHandler SocketIO
cometd/bayeux protocol This sample deploy the Cometd official demo on top of Atmosphere
websocket-chat This sample demonstrates how to write WebSocket ONLY applications WebSockerHandler JavaScript Function
Something went wrong with that request. Please try again.