com.sun.grizzly.samples.websockets
Class ChatApplication

java.lang.Object
  extended by com.sun.grizzly.websockets.WebSocketAdapter
      extended by com.sun.grizzly.websockets.WebSocketApplication
          extended by com.sun.grizzly.samples.websockets.ChatApplication
All Implemented Interfaces:
WebSocketListener

public class ChatApplication
extends WebSocketApplication


Constructor Summary
ChatApplication()
           
 
Method Summary
 WebSocket createSocket(WebSocketListener[] listeners)
           
 boolean isApplicationRequest(Request request)
          Checks application specific criteria to determine if this application can process the Request as a WebSocket connection.
 void onMessage(WebSocket socket, String frame)
           
 
Methods inherited from class com.sun.grizzly.websockets.WebSocketApplication
add, getWebSockets, onClose, onConnect, remove, upgrade
 
Methods inherited from class com.sun.grizzly.websockets.WebSocketAdapter
onFragment, onMessage, onPing, onPong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatApplication

public ChatApplication()
Method Detail

isApplicationRequest

public boolean isApplicationRequest(Request request)
Description copied from class: WebSocketApplication
Checks application specific criteria to determine if this application can process the Request as a WebSocket connection.

Specified by:
isApplicationRequest in class WebSocketApplication
Returns:
true if this application can service this Request

createSocket

public WebSocket createSocket(WebSocketListener[] listeners)
Overrides:
createSocket in class WebSocketApplication

onMessage

public void onMessage(WebSocket socket,
                      String frame)
Specified by:
onMessage in interface WebSocketListener
Overrides:
onMessage in class WebSocketAdapter


Copyright © 2012 Oracle Corporation. All Rights Reserved.