org.atmosphere.samples.chat
Class WebSocketChat
java.lang.Object
org.atmosphere.websocket.WebSocketStreamingHandlerAdapter
org.atmosphere.samples.chat.WebSocketChat
- All Implemented Interfaces:
- org.atmosphere.websocket.WebSocketHandler, org.atmosphere.websocket.WebSocketStreamingHandler
@WebSocketHandlerService(path="/chat",
broadcaster=org.atmosphere.util.SimpleBroadcaster.class,
atmosphereConfig="org.atmosphere.websocket.WebSocketProtocol=org.atmosphere.websocket.protocol.StreamingHttpProtocol")
public class WebSocketChat- extends org.atmosphere.websocket.WebSocketStreamingHandlerAdapter
Simple WebSocketHandler that implement the logic to build a Chat application.
- Author:
- Jeanfrancois Arcand
|
Method Summary |
void |
onOpen(org.atmosphere.websocket.WebSocket webSocket)
|
void |
onTextStream(org.atmosphere.websocket.WebSocket webSocket,
Reader reader)
|
| Methods inherited from class org.atmosphere.websocket.WebSocketStreamingHandlerAdapter |
onBinaryStream, onByteMessage, onClose, onError, onTextMessage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebSocketChat
public WebSocketChat()
onOpen
public void onOpen(org.atmosphere.websocket.WebSocket webSocket)
throws IOException
- Specified by:
onOpen in interface org.atmosphere.websocket.WebSocketHandler- Overrides:
onOpen in class org.atmosphere.websocket.WebSocketStreamingHandlerAdapter
- Throws:
IOException
onTextStream
public void onTextStream(org.atmosphere.websocket.WebSocket webSocket,
Reader reader)
throws IOException
- Specified by:
onTextStream in interface org.atmosphere.websocket.WebSocketStreamingHandler- Overrides:
onTextStream in class org.atmosphere.websocket.WebSocketStreamingHandlerAdapter
- Throws:
IOException
Copyright © 2014. All Rights Reserved.