org.atmosphere.samples.chat
Class ChatAtmosphereHandler

java.lang.Object
  extended by org.atmosphere.handler.AbstractReflectorAtmosphereHandler
      extended by org.atmosphere.handler.OnMessage<String>
          extended by org.atmosphere.samples.chat.ChatAtmosphereHandler
All Implemented Interfaces:
AtmosphereHandler

@ManagedService(path="/chat")
public class ChatAtmosphereHandler
extends OnMessage<String>

Simple AtmosphereHandler that implement the logic to build a Chat application.

Author:
Jeanfrancois Arcand

Nested Class Summary
static class ChatAtmosphereHandler.Data
           
static class ChatAtmosphereHandler.WebSocketEventListener
          Simple listener for events.
 
Field Summary
 
Fields inherited from class org.atmosphere.handler.OnMessage
MESSAGE_DELIMITER
 
Constructor Summary
ChatAtmosphereHandler()
           
 
Method Summary
 void onMessage(AtmosphereResponse response, String message)
          Echo the JSON Message we receives.
 
Methods inherited from class org.atmosphere.handler.OnMessage
destroy, onDisconnect, onOpen, onRequest, onResume, onStateChange, onTimeout
 
Methods inherited from class org.atmosphere.handler.AbstractReflectorAtmosphereHandler
postStateChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatAtmosphereHandler

public ChatAtmosphereHandler()
Method Detail

onMessage

public void onMessage(AtmosphereResponse response,
                      String message)
               throws IOException
Echo the JSON Message we receives.

Specified by:
onMessage in class OnMessage<String>
Parameters:
response - an AtmosphereResponse
message - a message of type T
Throws:
IOException


Copyright © 2013. All Rights Reserved.