org.glassfish.grizzly.websockets
Interface WebSocketHandler<W extends WebSocket>

All Known Implementing Classes:
WebSocketApplication, WebSocketClientHandler

public interface WebSocketHandler<W extends WebSocket>

Base WebSocket events handler.

Author:
Alexey Stashok
See Also:
WebSocketClientHandler, WebSocketApplication

Method Summary
 void onClose(W websocket)
          Method is called, when WebSocket gets closed.
 void onMessage(W websocket, Frame frame)
          Method is called, when WebSocket receives a Frame.
 

Method Detail

onClose

void onClose(W websocket)
             throws IOException
Method is called, when WebSocket gets closed.

Parameters:
websocket - WebSocket
Throws:
IOException

onMessage

void onMessage(W websocket,
               Frame frame)
               throws IOException
Method is called, when WebSocket receives a Frame.

Parameters:
websocket - WebSocket
frame - Frame
Throws:
IOException


Copyright © 2010 Oracle Corpration. All Rights Reserved.