public class WebSocketConnectionD06 extends AbstractConnection implements WebSocketConnection
_endp
Constructor and Description |
---|
WebSocketConnectionD06(WebSocket websocket,
EndPoint endpoint,
WebSocketBuffers buffers,
long timestamp,
int maxIdleTime,
String protocol) |
Modifier and Type | Method and Description |
---|---|
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.
|
static String |
hashKey(String key) |
boolean |
isIdle() |
boolean |
isSuspended()
The semantic of this method is to return true to indicate interest in further reads,
or false otherwise, but it is misnamed and should be really called
isReadInterested() . |
void |
onClose()
Called after the connection is closed
|
protected void |
onFrameHandshake() |
void |
onIdleExpired(long idleForMs)
Called when the connection idle timeout expires
|
void |
onInputShutdown() |
protected void |
onWebSocketOpen() |
void |
shutdown() |
getEndPoint, getTimeStamp, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTimeStamp
public WebSocketConnectionD06(WebSocket websocket, EndPoint endpoint, WebSocketBuffers buffers, long timestamp, int maxIdleTime, String protocol) throws IOException
IOException
public WebSocket.Connection getConnection()
getConnection
in interface WebSocketConnection
public Connection handle() throws IOException
Connection
handle
in interface Connection
IOException
- if the handling of I/O operations failpublic void onInputShutdown() throws IOException
onInputShutdown
in interface AsyncConnection
IOException
public boolean isIdle()
isIdle
in interface Connection
Connection.onIdleExpired(long)
public void onIdleExpired(long idleForMs)
Connection
onIdleExpired
in interface Connection
onIdleExpired
in class AbstractConnection
idleForMs
- how long the connection has been idleConnection.isIdle()
public boolean isSuspended()
Connection
The semantic of this method is to return true to indicate interest in further reads,
or false otherwise, but it is misnamed and should be really called isReadInterested()
.
isSuspended
in interface Connection
public void onClose()
Connection
onClose
in interface Connection
public void closeIn(int code, String message)
public void closeOut(int code, String message)
public void shutdown()
shutdown
in interface WebSocketConnection
public void fillBuffersFrom(Buffer buffer)
fillBuffersFrom
in interface WebSocketConnection
public List<Extension> getExtensions()
getExtensions
in interface WebSocketConnection
protected void onFrameHandshake()
protected void onWebSocketOpen()
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.