-
-
Notifications
You must be signed in to change notification settings - Fork 757
Getting Started with the samples
jfarcand edited this page May 14, 2012
·
29 revisions
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, whcih 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.
<Sample Name | Description | Server Components | Client Components |
[all-api-pubsub](http://search.maven.org/#artifactdetails%7Corg.atmosphere.samples%7Catmosphere-all-api-pubsub%7C0.9.4%7Cwar) | 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](https://github.com/Atmosphere/atmosphere/blob/master/samples/all-api-pubsub/src/main/scala/org/atmosphere/samples/pubsub/websocket/AtmosphereHandler.scala) [Jersey Resource](https://github.com/Atmosphere/atmosphere/blob/master/samples/all-api-pubsub/src/main/scala/org/atmosphere/samples/pubsub/websocket/Resource.scala) [Meteor](https://github.com/Atmosphere/atmosphere/blob/master/samples/all-api-pubsub/src/main/scala/org/atmosphere/samples/pubsub/websocket/Meteor.scala) [WebSocketProtocol](https://github.com/Atmosphere/atmosphere/blob/master/samples/all-api-pubsub/src/main/scala/org/atmosphere/samples/pubsub/websocket/DevoxxWebSocketProtocol.scala) | Single [Callback](https://github.com/Atmosphere/atmosphere/blob/master/samples/all-api-pubsub/src/main/webapp/index.html) supporting WebSocket, Long-Polling, JSONP, Http-Streaming |
[async-annotation-pubsub](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-async-channel%22) | 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](https://github.com/Atmosphere/atmosphere/blob/master/samples/async-annotation-pubsub/src/main/java/org/atmosphere/samples/pubsub/AsynchronousAnnotation.java) | Single [Callback](https://github.com/Atmosphere/atmosphere/blob/master/samples/async-annotation-pubsub/src/main/webapp/index.html#L36) supporting WebSocket, Long-Polling, JSONP, Http-Streaming |
[atmosphere-ee6](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-ee6%22) | This sample demonstrates the use of @Suspend with Java EE's 6 annotation like @Resource and EJB Timer | [Jersey Resource](https://github.com/Atmosphere/atmosphere/blob/master/samples/atmosphere-ee6/src/main/java/org/jersey/devoxx/samples/ee6/atmosphere/TimerResource.java) | Http-Streaming |
[channel](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-channel%22) | 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](https://github.com/Atmosphere/atmosphere/blob/master/samples/channel/src/main/java/org/atmosphere/samples/pubsub/TypedChannel.java) | |
[chat-guice](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-guice-chat%22) | This sample demonstrate the use of Google Guice with Atmosphere. The Chat application is implemented using @Suspend and @Broadcast annotation | [Guice](https://github.com/Atmosphere/atmosphere/blob/master/samples/chat-guice/src/main/java/org/atmosphere/samples/guice/GuiceChatModule.java) [Jersey Resource](https://github.com/Atmosphere/atmosphere/blob/master/samples/chat-guice/src/main/java/org/atmosphere/samples/guice/ResourceChat.java) | Javascript Functions demonstrating [WebSocket, falling back to Long-Polling](https://github.com/Atmosphere/atmosphere/blob/master/samples/chat-guice/src/main/webapp/jquery/application.js) |
[chat](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-chat%22) | 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](https://github.com/Atmosphere/atmosphere/blob/master/samples/chat/src/main/java/org/atmosphere/samples/chat/ChatAtmosphereHandler.java) | Javascript Functions demonstrating [WebSocket, falling back to Long-Polling](https://github.com/Atmosphere/atmosphere/blob/master/samples/chat/src/main/webapp/jquery/application.js). Code demonstrating how to negotiate with the server demonstrated as well |
[di-guice-sample](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-di-guice-sample%22) | The sample demonstrates the use of Atmosphere's Dependencies Injection using Guice | [Jersey Resource](https://github.com/Atmosphere/atmosphere/blob/master/samples/di-guice-sample/src/main/java/org/atmosphere/samples/di/guice/MessageResource.java) [Guice](https://github.com/Atmosphere/atmosphere/blob/master/samples/di-guice-sample/src/main/java/org/atmosphere/samples/di/guice/GuiceContextListener.java) | [Javascript Callback](https://github.com/Atmosphere/atmosphere/blob/master/samples/di-guice-sample/src/main/webapp/index.html#L46) |
[gwt-demo](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-gwt-demo%22) | This samples demonstrates the use of the Atmosphere GWT extension. | [GWT](https://github.com/Atmosphere/atmosphere/blob/master/samples/gwt-demo/src/main/java/org/atmosphere/samples/server/AtmosphereHandler.java) | [GWT](https://github.com/Atmosphere/atmosphere/blob/master/samples/gwt-demo/src/main/java/org/atmosphere/samples/client/GWTDemo.java) |
[gwt-jsdemo](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-gwt-jsdemo%22) | This sample demonstrates the use of the GWT Javascript client | [GWT](https://github.com/Atmosphere/atmosphere/blob/master/samples/gwt-jsdemo/src/main/webapp/index.html) | [GWT Javascript Library](https://github.com/Atmosphere/atmosphere/blob/master/samples/gwt-jsdemo/src/main/webapp/index.html) |
[jaxrs2-chat](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22atmosphere-jaxrs2-chat%22) | This samples demonstrates the use of JAX RS Specification 2 using the @Context, ExecutionContext and @Suspend annotation | [Jersey Resource](https://github.com/Atmosphere/atmosphere/blob/master/samples/jaxrs2-chat/src/main/java/org/atmosphere/samples/chat/jersey/Jaxrs2Chat.java) | Javascript Functions demonstrating [WebSocket, falling back to Long-Polling](https://github.com/Atmosphere/atmosphere/blob/master/samples/jaxrs2-chat/src/main/webapp/jquery/application.js) |
[jquery-atmospherehandler-pubsub](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-atmospherehandler-pubsub%22) | This sample demonstrate the use of AtmosphereHandler for implementing a pub sub application. The sample supports Long-Polling, Http Streaming and WebSocket | [AtmosphereHandler](https://github.com/Atmosphere/atmosphere/blob/master/samples/jquery-atmospherehandler-pubsub/src/main/java/org/atmosphere/samples/pubsub/AtmosphereHandlerPubSub.java#L39) | [Javascript Function](https://github.com/Atmosphere/atmosphere/blob/master/samples/jquery-atmospherehandler-pubsub/src/main/webapp/index.html) |
[atmosphere-meteor-pubsub](http://search.maven.org/#search|gav|1|g%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-meteor-pubsub%22) | 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](https://github.com/Atmosphere/atmosphere/blob/master/samples/jquery-meteor-pubsub/src/main/java/org/atmosphere/samples/pubsub/MeteorPubSub.java) | [Javascript Function](https://github.com/Atmosphere/atmosphere/blob/master/samples/jquery-meteor-pubsub/src/main/webapp/index.html#L8) |
[jquery-multirequest](http://search.maven.org/#search|gav|1|g%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-multirequest%22) | This sample demonstrates how multi requests can be made using the jQuery.atmosphere.js. The sample implements the pub sub application. | [Jersey Resource](https://github.com/Atmosphere/atmosphere/blob/master/samples/jquery-multirequest/src/main/java/org/atmosphere/samples/multirequest/handlers/Subscriber.java#L33)/td> | [Per Request and Global callback](https://github.com/Atmosphere/atmosphere/blob/master/samples/jquery-multirequest/src/main/webapp/js/main.js) |
[jquery-pubsub](http://search.maven.org/#search|gav|1|g%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-jquery-pubsub%22) | 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](https://github.com/Atmosphere/atmosphere/blob/master/samples/jquery-pubsub/src/main/java/org/atmosphere/samples/pubsub/JQueryPubSub.java) | [Javascript Function](https://github.com/Atmosphere/atmosphere/blob/master/samples/jquery-pubsub/src/main/webapp/index.html) |
[jquery-websockethandler-pubsub](http://search.maven.org/#search|gav|1|g%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-websockethandler-pubsub%22) | This sample demonstrates how to write WebSocket only application | [WebSocketHandler](https://github.com/Atmosphere/atmosphere/blob/master/samples/jquery-websockethandler-pubsub/src/main/java/org/atmosphere/samples/pubsub/WebSocketPubSub.java#L36) | [Javascript Funtion](https://github.com/Atmosphere/atmosphere/blob/master/samples/jquery-websockethandler-pubsub/src/main/webapp/index.html#L36) |
[jquery-pubsub](http://search.maven.org/#search|gav|1|g%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-pubsub%22) | This sample demonstrates a lot of server side functionality like broadcast/suspend/resume using a Jersey Resource. | [Jersey Resource](https://github.com/Atmosphere/atmosphere/blob/master/samples/pubsub/src/main/java/org/atmosphere/samples/pubsub/PubSub.java) | |
[meteor-pubsub](http://search.maven.org/#search|gav|1|g%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-meteor-pubsub%22) | This sample demonstrates of the Meteor API, from a Servlet, can be used to implement a chat application | [Meteor](https://github.com/Atmosphere/atmosphere/blob/master/samples/meteor-chat/src/main/java/org/atmosphere/samples/chat/MeteorChat.java) | [Javascript Function](https://github.com/Atmosphere/atmosphere/blob/master/samples/meteor-chat/src/main/webapp/jquery/application.js) |
- Understanding Atmosphere
- Understanding @ManagedService
- Using javax.inject.Inject and javax.inject.PostConstruct annotation
- Understanding Atmosphere's Annotation
- Understanding AtmosphereResource
- Understanding AtmosphereHandler
- Understanding WebSocketHandler
- Understanding Broadcaster
- Understanding BroadcasterCache
- Understanding Meteor
- Understanding BroadcastFilter
- Understanding Atmosphere's Events Listeners
- Understanding AtmosphereInterceptor
- Configuring Atmosphere for Performance
- Understanding JavaScript functions
- Understanding AtmosphereResourceSession
- Improving Performance by using the PoolableBroadcasterFactory
- Using Atmosphere Jersey API
- Using Meteor API
- Using AtmosphereHandler API
- Using Socket.IO
- Using GWT
- Writing HTML5 Server-Sent Events
- Using STOMP protocol
- Streaming WebSocket messages
- Configuring Atmosphere's Classes Creation and Injection
- Using AtmosphereInterceptor to customize Atmosphere Framework
- Writing WebSocket sub protocol
- Configuring Atmosphere for the Cloud
- Injecting Atmosphere's Components in Jersey
- Sharing connection between Browser's windows and tabs
- Understanding AtmosphereResourceSession
- Manage installed services
- Server Side: javadoc API
- Server Side: atmosphere.xml and web.xml configuration
- Client Side: atmosphere.js API