A HttpConnection represents the connection of a HTTP client to the server
and is created by an instance of a Connector. It's prime function is
to associate Request and Response instances with a EndPoint.
A connection is also the prime mechanism used by jetty to recycle objects without
pooling. The Request, Response, HttpParser, HttpGenerator
and HttpFields instances are all recycled for the duraction of
a connection. Where appropriate, allocated buffers are also kept associated
with the connection via the parser and/or generator.
| Modifier and Type | Class and Description |
|---|---|
| public class | |
| public class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private static ThreadLocal | |
| private Object | |
| protected final Connector | |
| private transient boolean | |
| private boolean | |
| protected final EndPoint | |
| private transient int | |
| protected final Generator | |
| private boolean | |
| private transient boolean | |
| private transient boolean | |
| protected ServletInputStream | |
| pack-priv int | |
| protected HttpConnection. | |
| protected final Parser | |
| protected PrintWriter | |
| protected final Request | |
| protected final HttpFields | |
| private int | |
| protected final Response | |
| protected final HttpFields | |
| protected final Server | |
| private long | |
| protected final HttpURI | |
| private transient int | |
| protected HttpConnection. | |
| private static int |
| Access | Constructor and Description |
|---|---|
| public | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public Object | |
| public Connector | |
| public static HttpConnection | |
| public EndPoint | |
| public Generator | |
| public ServletInputStream | Returns: The input stream for this connection. The stream will be created if it does not already exist.
|
| public ServletOutputStream | Returns: The output stream for this connection. The stream will be created if it does not already exist.
|
| public Parser | |
| public PrintWriter | Returns: APrintWriter wrapping the output stream. The writer is created if it
does not already exist.
|
| public Request | |
| public HttpFields | |
| public int | |
| public boolean | |
| public Response | |
| public HttpFields | |
| public long | |
| public void | |
| protected void | |
| public void | |
| public void | |
| public boolean | Returns: The result of callinggetConnector.isCondidential(request), or false
if there is no connector.
|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| public void | |
| public void | |
| protected static void |
| __currentConnection | back to summary |
|---|---|
| private static ThreadLocal<HttpConnection> __currentConnection | |
| _associatedObject | back to summary |
|---|---|
| private Object _associatedObject | |
| _connector | back to summary |
|---|---|
| protected final Connector _connector | |
| _delayedHandling | back to summary |
|---|---|
| private transient boolean _delayedHandling | |
| _destroy | back to summary |
|---|---|
| private boolean _destroy | |
| _endp | back to summary |
|---|---|
| protected final EndPoint _endp | |
| _expect | back to summary |
|---|---|
| private transient int _expect | |
| _generator | back to summary |
|---|---|
| protected final Generator _generator | |
| _handling | back to summary |
|---|---|
| private boolean _handling | |
| _head | back to summary |
|---|---|
| private transient boolean _head | |
| _host | back to summary |
|---|---|
| private transient boolean _host | |
| _in | back to summary |
|---|---|
| protected ServletInputStream _in | |
| _include | back to summary |
|---|---|
| pack-priv int _include | |
| _out | back to summary |
|---|---|
| protected HttpConnection. | |
| _parser | back to summary |
|---|---|
| protected final Parser _parser | |
| _printWriter | back to summary |
|---|---|
| protected PrintWriter _printWriter | |
| _request | back to summary |
|---|---|
| protected final Request _request | |
| _requestFields | back to summary |
|---|---|
| protected final HttpFields _requestFields | |
| _requests | back to summary |
|---|---|
| private int _requests | |
| _response | back to summary |
|---|---|
| protected final Response _response | |
| _responseFields | back to summary |
|---|---|
| protected final HttpFields _responseFields | |
| _server | back to summary |
|---|---|
| protected final Server _server | |
| _timeStamp | back to summary |
|---|---|
| private long _timeStamp | |
| _uri | back to summary |
|---|---|
| protected final HttpURI _uri | |
| _version | back to summary |
|---|---|
| private transient int _version | |
| _writer | back to summary |
|---|---|
| protected HttpConnection. | |
| UNKNOWN | back to summary |
|---|---|
| private static int UNKNOWN | |
| HttpConnection | back to summary |
|---|---|
| public HttpConnection(Connector connector, EndPoint endpoint, Server server) Constructor | |
| HttpConnection | back to summary |
|---|---|
| protected HttpConnection(Connector connector, EndPoint endpoint, Server server, Parser parser, Generator generator, Request request) | |
| cancelTimeout | back to summary |
|---|---|
| public void cancelTimeout(Timeout. | |
| commitResponse | back to summary |
|---|---|
| public void commitResponse(boolean last) throws IOException | |
| completeResponse | back to summary |
|---|---|
| public void completeResponse() throws IOException | |
| destroy | back to summary |
|---|---|
| public void destroy() | |
| flushResponse | back to summary |
|---|---|
| public void flushResponse() throws IOException | |
| getAssociatedObject | back to summary |
|---|---|
public Object getAssociatedObject()
| |
| getConnector | back to summary |
|---|---|
public Connector getConnector()
| |
| getCurrentConnection | back to summary |
|---|---|
| public static HttpConnection getCurrentConnection() | |
| getEndPoint | back to summary |
|---|---|
| public EndPoint getEndPoint() | |
| getGenerator | back to summary |
|---|---|
| public Generator getGenerator() | |
| getInputStream | back to summary |
|---|---|
public ServletInputStream getInputStream() throws IOException
| |
| getOutputStream | back to summary |
|---|---|
public ServletOutputStream getOutputStream()
| |
| getParser | back to summary |
|---|---|
public Parser getParser()
| |
| getPrintWriter | back to summary |
|---|---|
public PrintWriter getPrintWriter(String encoding)
| |
| getRequest | back to summary |
|---|---|
public Request getRequest()
| |
| getRequestFields | back to summary |
|---|---|
public HttpFields getRequestFields()
| |
| getRequests | back to summary |
|---|---|
public int getRequests()
| |
| getResolveNames | back to summary |
|---|---|
public boolean getResolveNames()
| |
| getResponse | back to summary |
|---|---|
public Response getResponse()
| |
| getResponseFields | back to summary |
|---|---|
public HttpFields getResponseFields()
| |
| getTimeStamp | back to summary |
|---|---|
public long getTimeStamp()
| |
| handle | back to summary |
|---|---|
| public void handle() throws IOException Implements org. | |
| handleRequest | back to summary |
|---|---|
| protected void handleRequest() throws IOException | |
| include | back to summary |
|---|---|
| public void include() | |
| included | back to summary |
|---|---|
| public void included() | |
| isConfidential | back to summary |
|---|---|
public boolean isConfidential(Request request)
| |
| isIdle | back to summary |
|---|---|
| public boolean isIdle() Implements org. | |
| isIncluding | back to summary |
|---|---|
| public boolean isIncluding() | |
| isIntegral | back to summary |
|---|---|
| public boolean isIntegral(Request request) Find out if the request is INTEGRAL security. | |
| isResponseCommitted | back to summary |
|---|---|
| public boolean isResponseCommitted() | |
| reset | back to summary |
|---|---|
| public void reset(boolean returnBuffers) | |
| scheduleTimeout | back to summary |
|---|---|
| public void scheduleTimeout(Timeout. | |
| setAssociatedObject | back to summary |
|---|---|
public void setAssociatedObject(Object associatedObject)
| |
| setCurrentConnection | back to summary |
|---|---|
| protected static void setCurrentConnection(HttpConnection connection) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides org. Implements java. |
| public void | flush()
Overrides org. Implements java. |
| public void | print(String
the s)String to send to the clientOverrides org. String to the client,
without a carriage return-line feed (CRLF)
character at the end.
|
| public void | |
| public void |
| Output | back to summary |
|---|---|
| pack-priv Output() | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides org. Implements java. Doc from java. Closes this output stream and releases any system resources
associated with this stream. The general contract of
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides org. Implements java. Doc from java. Flushes this output stream and forces any buffered output bytes
to be written out. The general contract of If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| back to summary | |
|---|---|
| public void print(String s) throws IOException Overrides org. Doc from javax. Writes a
| |
| sendContent | back to summary |
|---|---|
| public void sendContent(Object content) throws IOException | |
| sendResponse | back to summary |
|---|---|
| public void sendResponse(Buffer response) throws IOException | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| OutputWriter | back to summary |
|---|---|
| pack-priv OutputWriter() | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | messageComplete(long contextLength)
Overrides org. |
| public void | parsedHeader(Buffer name, Buffer value)
Overrides org. |
| public void | startRequest(Buffer method, Buffer uri, Buffer version)
Implements abstract org. |
| public void | startResponse(Buffer version, int status, Buffer reason)
Implements abstract org. |
| _charset | back to summary |
|---|---|
| private String _charset | |
| RequestHandler | back to summary |
|---|---|
| private RequestHandler() | |
| content | back to summary |
|---|---|
| public void content(Buffer ref) throws IOException Implements abstract org. | |
| headerComplete | back to summary |
|---|---|
| public void headerComplete() throws IOException Overrides org. | |
| messageComplete | back to summary |
|---|---|
| public void messageComplete(long contextLength) throws IOException Overrides org. | |
| parsedHeader | back to summary |
|---|---|
| public void parsedHeader(Buffer name, Buffer value) Overrides org. Doc from org. This is the method called by parser when a HTTP Header name and value is found | |
| startRequest | back to summary |
|---|---|
| public void startRequest(Buffer method, Buffer uri, Buffer version) throws IOException Implements abstract org. Doc from org. This is the method called by parser when the HTTP request line is parsed | |
| startResponse | back to summary |
|---|---|
| public void startResponse(Buffer version, int status, Buffer reason) Implements abstract org. Doc from org. This is the method called by parser when the HTTP request line is parsed | |