org.eclipse.jetty.client
Class AbstractHttpConnection

java.lang.Object
  extended by org.eclipse.jetty.io.AbstractConnection
      extended by org.eclipse.jetty.client.AbstractHttpConnection
All Implemented Interfaces:
Connection, Dumpable
Direct Known Subclasses:
AsyncHttpConnection, BlockingHttpConnection

public abstract class AbstractHttpConnection
extends AbstractConnection
implements Dumpable

Version:
$Revision: 879 $ $Date: 2009-09-11 16:13:28 +0200 (Fri, 11 Sep 2009) $

Field Summary
protected  Buffer _connectionHeader
           
protected  HttpDestination _destination
           
protected  HttpExchange _exchange
           
protected  HttpGenerator _generator
           
protected  boolean _http11
           
protected  HttpParser _parser
           
protected  HttpExchange _pipeline
           
protected  boolean _reserved
           
protected  int _status
           
 
Fields inherited from class org.eclipse.jetty.io.AbstractConnection
_endp
 
Method Summary
 boolean cancelIdleTimeout()
           
 void close()
           
protected  void commitRequest()
           
 java.lang.String dump()
           
 void dump(java.lang.Appendable out, java.lang.String indent)
           
protected  void exchangeExpired(HttpExchange exchange)
           
 HttpDestination getDestination()
           
abstract  Connection handle()
          Handle the connection.
 boolean isIdle()
           
 boolean isReserved()
           
 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 reset()
           
 boolean send(HttpExchange ex)
           
 void setDestination(HttpDestination destination)
           
 void setIdleTimeout()
           
 void setReserved(boolean reserved)
           
 java.lang.String toDetailString()
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.jetty.io.AbstractConnection
getEndPoint, getTimeStamp, onIdleExpired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_destination

protected HttpDestination _destination

_generator

protected HttpGenerator _generator

_parser

protected HttpParser _parser

_http11

protected boolean _http11

_status

protected int _status

_connectionHeader

protected Buffer _connectionHeader

_reserved

protected boolean _reserved

_exchange

protected volatile HttpExchange _exchange

_pipeline

protected HttpExchange _pipeline
Method Detail

setReserved

public void setReserved(boolean reserved)

isReserved

public boolean isReserved()

getDestination

public HttpDestination getDestination()

setDestination

public void setDestination(HttpDestination destination)

send

public boolean send(HttpExchange ex)
             throws java.io.IOException
Throws:
java.io.IOException

handle

public abstract Connection handle()
                           throws java.io.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:
java.io.IOException - if the handling of I/O operations fail

isIdle

public boolean isIdle()
Specified by:
isIdle in interface Connection
Returns:
whether this connection is idle, that is not parsing and not generating
See Also:
Connection.onIdleExpired(long)

isSuspended

public boolean isSuspended()
Description copied from interface: 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().

Specified by:
isSuspended in interface Connection
Returns:
true to indicate interest in further reads, false otherwise

onClose

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

Specified by:
onClose in interface Connection

commitRequest

protected void commitRequest()
                      throws java.io.IOException
Throws:
java.io.IOException

reset

protected void reset()
              throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class AbstractConnection

toDetailString

public java.lang.String toDetailString()

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

setIdleTimeout

public void setIdleTimeout()

cancelIdleTimeout

public boolean cancelIdleTimeout()

exchangeExpired

protected void exchangeExpired(HttpExchange exchange)

dump

public java.lang.String dump()
Specified by:
dump in interface Dumpable
See Also:
Dumpable.dump()

dump

public void dump(java.lang.Appendable out,
                 java.lang.String indent)
          throws java.io.IOException
Specified by:
dump in interface Dumpable
Throws:
java.io.IOException
See Also:
Dumpable.dump(java.lang.Appendable, java.lang.String)


Copyright © 2013. All Rights Reserved.