org.eclipse.jetty.websocket
Interface WebSocket

All Known Subinterfaces:
WebSocket.OnBinaryMessage, WebSocket.OnControl, WebSocket.OnFrame, WebSocket.OnTextMessage

public interface WebSocket

WebSocket Interface.

This interface provides the signature for a server-side end point of a websocket connection. The Interface has several nested interfaces, for each type of message that may be received.


Nested Class Summary
static interface WebSocket.Connection
           
static interface WebSocket.OnBinaryMessage
          A nested WebSocket interface for receiving binary messages
static interface WebSocket.OnControl
          A nested WebSocket interface for receiving control messages
static interface WebSocket.OnFrame
          A nested WebSocket interface for receiving any websocket frame
static interface WebSocket.OnTextMessage
          A nested WebSocket interface for receiving text messages
 
Method Summary
 void onConnect(WebSocket.Connection connection)
          Called when a new websocket connection is accepted.
 void onDisconnect(int closeCode, String message)
          Called when an established websocket connection closes
 

Method Detail

onConnect

void onConnect(WebSocket.Connection connection)
Called when a new websocket connection is accepted.

Parameters:
connection - The Connection object to use to send messages.

onDisconnect

void onDisconnect(int closeCode,
                  String message)
Called when an established websocket connection closes

Parameters:
closeCode -
message -


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.