org.webbitserver.handler
Class ReconnectingWebSocketHandler
java.lang.Object
org.webbitserver.handler.ReconnectingWebSocketHandler
- All Implemented Interfaces:
- WebSocketHandler
public class ReconnectingWebSocketHandler
- extends Object
- implements WebSocketHandler
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReconnectingWebSocketHandler
public ReconnectingWebSocketHandler(WebSocketHandler handler,
WebSocket webSocket,
long reconnectIntervalMillis)
onOpen
public void onOpen(WebSocketConnection connection)
throws Throwable
- Specified by:
onOpen in interface WebSocketHandler
- Throws:
Throwable
onClose
public void onClose(WebSocketConnection connection)
throws Throwable
- Description copied from interface:
WebSocketHandler
- Called when a connection is closed.
- Specified by:
onClose in interface WebSocketHandler
- 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
public void onMessage(WebSocketConnection connection,
String msg)
throws Throwable
- Specified by:
onMessage in interface WebSocketHandler
- Throws:
Throwable
onMessage
public void onMessage(WebSocketConnection connection,
byte[] msg)
throws Throwable
- Specified by:
onMessage in interface WebSocketHandler
- Throws:
Throwable
onPing
public void onPing(WebSocketConnection connection,
byte[] msg)
throws Throwable
- Specified by:
onPing in interface WebSocketHandler
- Throws:
Throwable
onPong
public void onPong(WebSocketConnection connection,
byte[] msg)
throws Throwable
- Specified by:
onPong in interface WebSocketHandler
- Throws:
Throwable
Copyright © 2012. All Rights Reserved.