org.atmosphere.websocket
Class WebSocketHandlerAdapter

java.lang.Object
  extended by org.atmosphere.websocket.WebSocketHandlerAdapter
All Implemented Interfaces:
WebSocketHandler

public class WebSocketHandlerAdapter
extends Object
implements WebSocketHandler

Simple Adapter for WebSocketHandler

Author:
Jeanfrancois Arcand

Constructor Summary
WebSocketHandlerAdapter()
           
 
Method Summary
 void onByteMessage(WebSocket webSocket, byte[] data, int offset, int length)
          Invoked when a byte message is received.
 void onClose(WebSocket webSocket)
          Invoked when a WebSocket is closed.
 void onError(WebSocket webSocket, WebSocketProcessor.WebSocketException t)
          Invoked when a WebSocket produces an error.
 void onOpen(WebSocket webSocket)
          Invoked when a WebSocket is opened.
 void onTextMessage(WebSocket webSocket, String data)
          Invoked when a String message is received
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSocketHandlerAdapter

public WebSocketHandlerAdapter()
Method Detail

onByteMessage

public void onByteMessage(WebSocket webSocket,
                          byte[] data,
                          int offset,
                          int length)
                   throws IOException
Description copied from interface: WebSocketHandler
Invoked when a byte message is received.

Specified by:
onByteMessage in interface WebSocketHandler
Parameters:
webSocket - a WebSocket
Throws:
IOException

onTextMessage

public void onTextMessage(WebSocket webSocket,
                          String data)
                   throws IOException
Description copied from interface: WebSocketHandler
Invoked when a String message is received

Specified by:
onTextMessage in interface WebSocketHandler
Parameters:
webSocket - a WebSocket
Throws:
IOException

onOpen

public void onOpen(WebSocket webSocket)
            throws IOException
Description copied from interface: WebSocketHandler
Invoked when a WebSocket is opened.

Specified by:
onOpen in interface WebSocketHandler
Throws:
IOException

onClose

public void onClose(WebSocket webSocket)
Description copied from interface: WebSocketHandler
Invoked when a WebSocket is closed.

Specified by:
onClose in interface WebSocketHandler

onError

public void onError(WebSocket webSocket,
                    WebSocketProcessor.WebSocketException t)
Description copied from interface: WebSocketHandler
Invoked when a WebSocket produces an error.

Specified by:
onError in interface WebSocketHandler


Copyright © 2012. All Rights Reserved.