org.webbitserver
Interface WebSocketHandler
- All Known Implementing Classes:
- BaseWebSocketHandler, ReconnectingWebSocketHandler
public interface WebSocketHandler
onOpen
void onOpen(WebSocketConnection connection)
throws Throwable
- Throws:
Throwable
onClose
void onClose(WebSocketConnection connection)
throws Throwable
- Called when a connection is closed.
- Parameters:
connection - the connection that was closed. Beware that the connection will be null if this handler is used in a WebSocket that fails to connect.
- Throws:
Exception
Throwable
onMessage
void onMessage(WebSocketConnection connection,
String msg)
throws Throwable
- Throws:
Throwable
onMessage
void onMessage(WebSocketConnection connection,
byte[] msg)
throws Throwable
- Throws:
Throwable
onPing
void onPing(WebSocketConnection connection,
byte[] msg)
throws Throwable
- Throws:
Throwable
onPong
void onPong(WebSocketConnection connection,
byte[] msg)
throws Throwable
- Throws:
Throwable
Copyright © 2013. All Rights Reserved.