org.eclipse.jetty.websocket
Class WebSocketConnectionD7_9

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

public class WebSocketConnectionD7_9
extends AbstractConnection
implements WebSocketConnection


Field Summary
 
Fields inherited from class org.eclipse.jetty.io.AbstractConnection
_endp
 
Constructor Summary
WebSocketConnectionD7_9(WebSocket websocket, EndPoint endpoint, WebSocketBuffers buffers, long timestamp, int maxIdleTime, String protocol, List<Extension> extensions, 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()
           
 List<Extension> getExtensions()
           
 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
 boolean isIdle()
           
 boolean isSuspended()
           
 String toString()
           
 
Methods inherited from class org.eclipse.jetty.io.AbstractConnection
getEndPoint, getTimeStamp
 
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
 

Constructor Detail

WebSocketConnectionD7_9

public WebSocketConnectionD7_9(WebSocket websocket,
                               EndPoint endpoint,
                               WebSocketBuffers buffers,
                               long timestamp,
                               int maxIdleTime,
                               String protocol,
                               List<Extension> extensions,
                               int draft)
                        throws IOException
Throws:
IOException
Method Detail

getConnection

public WebSocket.Connection getConnection()

getExtensions

public List<Extension> getExtensions()
Specified by:
getExtensions in interface WebSocketConnection

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: Connection
Called when the connection idle timeout expires

Specified by:
idleExpired in interface Connection
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)

toString

public String toString()
Overrides:
toString in class AbstractConnection


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