org.eclipse.jetty.websocket
Class WebSocketConnection

java.lang.Object
  extended by org.eclipse.jetty.websocket.WebSocketConnection
All Implemented Interfaces:
Connection, WebSocket.Outbound

public class WebSocketConnection
extends Object
implements Connection, WebSocket.Outbound


Constructor Summary
WebSocketConnection(WebSocket websocket, EndPoint endpoint)
           
WebSocketConnection(WebSocket websocket, EndPoint endpoint, WebSocketBuffers buffers, long timestamp, long maxIdleTime)
           
 
Method Summary
 void disconnect()
           
 void fill(Buffer buffer)
           
 long getTimeStamp()
           
 Connection handle()
          Handle the connection.
 boolean isIdle()
           
 boolean isOpen()
           
 boolean isSuspended()
           
 void sendMessage(byte frame, byte[] content)
           
 void sendMessage(byte frame, byte[] content, int offset, int length)
           
 void sendMessage(byte frame, String content)
           
 void sendMessage(String content)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSocketConnection

public WebSocketConnection(WebSocket websocket,
                           EndPoint endpoint)

WebSocketConnection

public WebSocketConnection(WebSocket websocket,
                           EndPoint endpoint,
                           WebSocketBuffers buffers,
                           long timestamp,
                           long maxIdleTime)
Method Detail

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

isOpen

public boolean isOpen()
Specified by:
isOpen in interface WebSocket.Outbound

isIdle

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

isSuspended

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

getTimeStamp

public long getTimeStamp()
Specified by:
getTimeStamp in interface Connection

sendMessage

public void sendMessage(String content)
                 throws IOException
Specified by:
sendMessage in interface WebSocket.Outbound
Throws:
IOException

sendMessage

public void sendMessage(byte frame,
                        String content)
                 throws IOException
Specified by:
sendMessage in interface WebSocket.Outbound
Throws:
IOException

sendMessage

public void sendMessage(byte frame,
                        byte[] content)
                 throws IOException
Specified by:
sendMessage in interface WebSocket.Outbound
Throws:
IOException

sendMessage

public void sendMessage(byte frame,
                        byte[] content,
                        int offset,
                        int length)
                 throws IOException
Specified by:
sendMessage in interface WebSocket.Outbound
Throws:
IOException

disconnect

public void disconnect()
Specified by:
disconnect in interface WebSocket.Outbound

fill

public void fill(Buffer buffer)


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