org.mortbay.jetty
Class HttpConnection

java.lang.Object
  extended byorg.mortbay.jetty.HttpConnection

public class HttpConnection
extends Object

Author:
gregw To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Nested Class Summary
 class HttpConnection.Output
           
 class HttpConnection.OutputWriter
           
 
Constructor Summary
HttpConnection(Connector connector, EndPoint endpoint, Server server)
           
 
Method Summary
 void commitResponse(boolean last)
           
 void completeResponse()
           
 void flushResponse()
           
 Object getAssociatedObject()
           
 Connector getConnector()
           
static HttpConnection getCurrentConnection()
           
 EndPoint getEndPoint()
           
 ServletInputStream getInputStream()
           
 ServletOutputStream getOutputStream()
           
 PrintWriter getPrintWriter(String encoding)
           
 Request getRequest()
           
 HttpFields getRequestFields()
           
 int getRequests()
           
 boolean getResolveNames()
           
 Response getResponse()
           
 HttpFields getResponseFields()
           
 long getTimeStamp()
           
 void handle()
           
 void include()
           
 void included()
           
 boolean isConfidential(Request request)
           
 boolean isIdle()
           
 boolean isIncluding()
           
 boolean isIntegral(Request request)
          Find out if the request is INTEGRAL security.
 boolean isResponseCommitted()
           
 void setAssociatedObject(Object associatedObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpConnection

public HttpConnection(Connector connector,
                      EndPoint endpoint,
                      Server server)
Method Detail

getCurrentConnection

public static HttpConnection getCurrentConnection()

getRequests

public int getRequests()
Returns:
the number of requests handled by this connection

getTimeStamp

public long getTimeStamp()
Returns:
The time this connection was established.

getAssociatedObject

public Object getAssociatedObject()
Returns:
Returns the associatedObject.

setAssociatedObject

public void setAssociatedObject(Object associatedObject)
Parameters:
associatedObject - The associatedObject to set.

getConnector

public Connector getConnector()
Returns:
Returns the connector.

getRequestFields

public HttpFields getRequestFields()
Returns:
Returns the requestFields.

getResponseFields

public HttpFields getResponseFields()
Returns:
Returns the responseFields.

isConfidential

public boolean isConfidential(Request request)
Returns:
The result of calling getConnector().isCondidential(request), or false if there is no connector.

isIntegral

public boolean isIntegral(Request request)
Find out if the request is INTEGRAL security.

Parameters:
request -
Returns:
true if there is a connector and it considers request to be integral

getEndPoint

public EndPoint getEndPoint()
Returns:
The EndPoint for this connection.

getResolveNames

public boolean getResolveNames()
Returns:
false (this method is not yet implemented)

getRequest

public Request getRequest()
Returns:
Returns the request.

getResponse

public Response getResponse()
Returns:
Returns the response.

getInputStream

public ServletInputStream getInputStream()
Returns:
The input stream for this connection. The stream will be created if it does not already exist.

getOutputStream

public ServletOutputStream getOutputStream()
Returns:
The output stream for this connection. The stream will be created if it does not already exist.

getPrintWriter

public PrintWriter getPrintWriter(String encoding)
Returns:
A PrintWriter wrapping the output stream. The writer is created if it does not already exist.

isResponseCommitted

public boolean isResponseCommitted()

handle

public void handle()
            throws IOException
Throws:
IOException

commitResponse

public void commitResponse(boolean last)
                    throws IOException
Throws:
IOException

completeResponse

public void completeResponse()
                      throws IOException
Throws:
IOException

flushResponse

public void flushResponse()
                   throws IOException
Throws:
IOException

isIncluding

public boolean isIncluding()

include

public void include()

included

public void included()

isIdle

public boolean isIdle()