org.eclipse.jetty.websocket
Class WebSocketConnectionD06

java.lang.Object
  extended by org.eclipse.jetty.io.AbstractConnection
      extended by org.eclipse.jetty.websocket.WebSocketConnectionD06
All Implemented Interfaces:
Connection, Idleable, WebSocketConnection

public class WebSocketConnectionD06
extends AbstractConnection
implements WebSocketConnection


Field Summary
static int CLOSE_BADDATA
           
static int CLOSE_LARGE
           
static int CLOSE_NORMAL
           
static int CLOSE_PROTOCOL
           
static int CLOSE_SHUTDOWN
           
static byte OP_BINARY
           
static byte OP_CLOSE
           
static byte OP_CONTINUATION
           
static byte OP_PING
           
static byte OP_PONG
           
static byte OP_TEXT
           
 
Fields inherited from class org.eclipse.jetty.io.AbstractConnection
_endp
 
Constructor Summary
WebSocketConnectionD06(WebSocket websocket, EndPoint endpoint, WebSocketBuffers buffers, long timestamp, int maxIdleTime, String protocol, int draft)
           
 
Method Summary
 void closed()
          Called when the connection is closed
 void closeIn(int code, String message)
           
 void closeOut(int code, String message)
           
 void fillBuffersFrom(Buffer buffer)
           
 WebSocket.Connection getConnection()
           
 Connection handle()
          Handle the connection.
 void handshake(HttpServletRequest request, HttpServletResponse response, String origin, String subprotocol)
           
static String hashKey(String key)
           
 void idleExpired()
          Called when the connection idle timeout expires
static boolean isControlFrame(int opcode)
           
 boolean isIdle()
           
static boolean isLastFrame(int flags)
           
 boolean isSuspended()
           
 
Methods inherited from class org.eclipse.jetty.io.AbstractConnection
getEndPoint, getTimeStamp, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jetty.io.Connection
getTimeStamp
 

Field Detail

OP_CONTINUATION

public static final byte OP_CONTINUATION
See Also:
Constant Field Values

OP_CLOSE

public static final byte OP_CLOSE
See Also:
Constant Field Values

OP_PING

public static final byte OP_PING
See Also:
Constant Field Values

OP_PONG

public static final byte OP_PONG
See Also:
Constant Field Values

OP_TEXT

public static final byte OP_TEXT
See Also:
Constant Field Values

OP_BINARY

public static final byte OP_BINARY
See Also:
Constant Field Values

CLOSE_NORMAL

public static final int CLOSE_NORMAL
See Also:
Constant Field Values

CLOSE_SHUTDOWN

public static final int CLOSE_SHUTDOWN
See Also:
Constant Field Values

CLOSE_PROTOCOL

public static final int CLOSE_PROTOCOL
See Also:
Constant Field Values

CLOSE_BADDATA

public static final int CLOSE_BADDATA
See Also:
Constant Field Values

CLOSE_LARGE

public static final int CLOSE_LARGE
See Also:
Constant Field Values
Constructor Detail

WebSocketConnectionD06

public WebSocketConnectionD06(WebSocket websocket,
                              EndPoint endpoint,
                              WebSocketBuffers buffers,
                              long timestamp,
                              int maxIdleTime,
                              String protocol,
                              int draft)
                       throws IOException
Throws:
IOException
Method Detail

isLastFrame

public static boolean isLastFrame(int flags)

isControlFrame

public static boolean isControlFrame(int opcode)

getConnection

public WebSocket.Connection getConnection()

handle

public Connection handle()
                  throws IOException
Description copied from interface: Connection
Handle the connection.

Specified by:
handle in interface Connection
Returns:
The Connection to use for the next handling of the connection. This allows protocol upgrades and support for CONNECT.
Throws:
IOException

isIdle

public boolean isIdle()
Specified by:
isIdle in interface Connection

idleExpired

public void idleExpired()
Description copied from interface: Idleable
Called when the connection idle timeout expires

Specified by:
idleExpired in interface Idleable
Overrides:
idleExpired in class AbstractConnection

isSuspended

public boolean isSuspended()
Specified by:
isSuspended in interface Connection

closed

public void closed()
Description copied from interface: Connection
Called when the connection is closed

Specified by:
closed in interface Connection

closeIn

public void closeIn(int code,
                    String message)

closeOut

public void closeOut(int code,
                     String message)

fillBuffersFrom

public void fillBuffersFrom(Buffer buffer)
Specified by:
fillBuffersFrom in interface WebSocketConnection

handshake

public void handshake(HttpServletRequest request,
                      HttpServletResponse response,
                      String origin,
                      String subprotocol)
               throws IOException
Specified by:
handshake in interface WebSocketConnection
Throws:
IOException

hashKey

public static String hashKey(String key)


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