org.eclipse.jetty.io
Interface Connection

All Known Subinterfaces:
WebSocketConnection
All Known Implementing Classes:
AbstractConnection, Ajp13Connection, ConnectHandler.ClientToProxyConnection, ConnectHandler.ProxyToServerConnection, HttpConnection, HttpConnection, NestedConnection, WebSocketConnectionD00, WebSocketConnectionD06

public interface Connection

Abstract Connection used by Jetty Connectors.

Jetty will call the handle method of a connection when there is work to be done on the connection. For blocking connections, this is soon as the connection is open and handle will keep being called until the connection is closed. For non-blocking connections, handle will only be called if there are bytes to be read or the connection becomes writable after being write blocked.

See Also:
SelectorManager

Method Summary
 void closed()
          Called when the connection is closed
 long getTimeStamp()
           
 Connection handle()
          Handle the connection.
 void idleExpired()
          Called when the connection idle timeout expires
 boolean isIdle()
           
 boolean isSuspended()
           
 

Method Detail

handle

Connection handle()
                  throws IOException
Handle the connection.

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

getTimeStamp

long getTimeStamp()
Returns:
the timestamp at which the connection was created

isIdle

boolean isIdle()

isSuspended

boolean isSuspended()

closed

void closed()
Called when the connection is closed


idleExpired

void idleExpired()
Called when the connection idle timeout expires



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