Additional top-level class in compilation unit: PlaceholderOutputStream.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Map | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv HttpConnection | |
| private static final byte[] | |
| private final AtomicBoolean | |
| private final AtomicBoolean | |
| private static final DateTimeFormatter | |
| private static final String | |
| pack-priv boolean | |
| pack-priv String | |
| private static final boolean | |
| pack-priv HttpPrincipal | |
| pack-priv int | |
| pack-priv Request | |
| pack-priv long | |
| pack-priv Headers | |
| pack-priv InputStream | |
| pack-priv OutputStream | |
| private byte[] | |
| pack-priv long | |
| pack-priv Headers | |
| pack-priv boolean | |
| pack-priv ServerImpl | |
| pack-priv Thread | |
| pack-priv InputStream | |
| pack-priv LeftOverInputStream | |
| pack-priv OutputStream | |
| pack-priv PlaceholderOutputStream | |
| pack-priv URI | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private byte[] | |
| public void | |
| pack-priv int | Returns: the new (or current) value of the exchange count.Calls ServerImpl::endExchange if not already called for this exchange. |
| pack-priv static ExchangeImpl | |
| public Object | |
| pack-priv HttpConnection | |
| public HttpContextImpl | |
| public InetSocketAddress | |
| pack-priv LeftOverInputStream | |
| pack-priv PlaceholderOutputStream | |
| public HttpPrincipal | |
| public String | |
| public InetSocketAddress | |
| public InputStream | |
| public Headers | |
| public String | |
| public URI | |
| public OutputStream | |
| public int | |
| public Headers | |
| pack-priv ServerImpl | |
| public SSLSession | |
| private boolean | |
| pack-priv void | postExchangeFinished(boolean
whether all bytes expected by the
client have been writen out to the
response body output stream. writefinished)Posts the ExchangeFinished event if not already posted. |
| public void | |
| public void | |
| pack-priv void | |
| public void | |
| pack-priv void | |
| pack-priv synchronized boolean | writefinished()
When true, writefinished indicates that all bytes expected by the client have been written to the response body outputstream, and that the response body outputstream has been closed. |
| attributes | back to summary |
|---|---|
| pack-priv final Map<String, Object> attributes | |
| close | back to summary |
|---|---|
| pack-priv boolean close | |
| closed | back to summary |
|---|---|
| pack-priv boolean closed | |
| connection | back to summary |
|---|---|
| pack-priv HttpConnection connection | |
| CRLF | back to summary |
|---|---|
| private static final byte[] CRLF | |
| ended | back to summary |
|---|---|
| private final AtomicBoolean ended | |
| finished | back to summary |
|---|---|
| private final AtomicBoolean finished | |
| FORMATTER | back to summary |
|---|---|
| private static final DateTimeFormatter FORMATTER | |
| HEAD | back to summary |
|---|---|
| private static final String HEAD | |
| http10 | back to summary |
|---|---|
| pack-priv boolean http10 | |
| method | back to summary |
|---|---|
| pack-priv String method | |
| perExchangeAttributes | back to summary |
|---|---|
| private static final boolean perExchangeAttributes | |
| principal | back to summary |
|---|---|
| pack-priv HttpPrincipal principal | |
| rcode | back to summary |
|---|---|
| pack-priv int rcode | |
| req | back to summary |
|---|---|
| pack-priv Request req | |
| reqContentLen | back to summary |
|---|---|
| pack-priv long reqContentLen | |
| reqHdrs | back to summary |
|---|---|
| pack-priv Headers reqHdrs | |
| ris | back to summary |
|---|---|
| pack-priv InputStream ris | |
| ros | back to summary |
|---|---|
| pack-priv OutputStream ros | |
| rspbuf | back to summary |
|---|---|
| private byte[] rspbuf | |
| rspContentLen | back to summary |
|---|---|
| pack-priv long rspContentLen | |
| rspHdrs | back to summary |
|---|---|
| pack-priv Headers rspHdrs | |
| sentHeaders | back to summary |
|---|---|
| pack-priv boolean sentHeaders | |
| server | back to summary |
|---|---|
| pack-priv ServerImpl server | |
| thread | back to summary |
|---|---|
| pack-priv Thread thread | |
| uis | back to summary |
|---|---|
| pack-priv InputStream uis | |
| uis_orig | back to summary |
|---|---|
| pack-priv LeftOverInputStream uis_orig | |
| uos | back to summary |
|---|---|
| pack-priv OutputStream uos | |
| uos_orig | back to summary |
|---|---|
| pack-priv PlaceholderOutputStream uos_orig | |
| uri | back to summary |
|---|---|
| pack-priv URI uri | |
| writefinished | back to summary |
|---|---|
| private boolean writefinished | |
| ExchangeImpl | back to summary |
|---|---|
| pack-priv ExchangeImpl(String m, URI u, Request req, long len, HttpConnection connection) throws IOException | |
| bytes | back to summary |
|---|---|
| private byte[] bytes(String s, boolean isKey, int extra) throws IOException convert string to byte[], using rspbuf Make sure that at least "extra" bytes are free at end of rspbuf. Reallocate rspbuf if not big enough. caller must check return value to see if rspbuf moved Header values are supposed to be limited to 7-bit ASCII but 8-bit has to be allowed (for ISO_8859_1). For efficiency we just down cast 16 bit Java chars to byte. We don't allow any character that can't be encoded in 8 bits. | |
| close | back to summary |
|---|---|
| public void close() | |
| endExchange | back to summary |
|---|---|
| pack-priv int endExchange() Calls ServerImpl::endExchange if not already called for this exchange. ServerImpl::endExchange must be called exactly once per exchange, and this method ensures that it is not called more than once for this exchange.
| |
| get | back to summary |
|---|---|
| pack-priv static ExchangeImpl get(HttpExchange t) | |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(String name) | |
| getConnection | back to summary |
|---|---|
| pack-priv HttpConnection getConnection() PP | |
| getHttpContext | back to summary |
|---|---|
| public HttpContextImpl getHttpContext() | |
| getLocalAddress | back to summary |
|---|---|
| public InetSocketAddress getLocalAddress() | |
| getOriginalInputStream | back to summary |
|---|---|
| pack-priv LeftOverInputStream getOriginalInputStream() | |
| getPlaceholderResponseBody | back to summary |
|---|---|
| pack-priv PlaceholderOutputStream getPlaceholderResponseBody() | |
| getPrincipal | back to summary |
|---|---|
| public HttpPrincipal getPrincipal() | |
| getProtocol | back to summary |
|---|---|
| public String getProtocol() | |
| getRemoteAddress | back to summary |
|---|---|
| public InetSocketAddress getRemoteAddress() | |
| getRequestBody | back to summary |
|---|---|
| public InputStream getRequestBody() | |
| getRequestHeaders | back to summary |
|---|---|
| public Headers getRequestHeaders() | |
| getRequestMethod | back to summary |
|---|---|
| public String getRequestMethod() | |
| getRequestURI | back to summary |
|---|---|
| public URI getRequestURI() | |
| getResponseBody | back to summary |
|---|---|
| public OutputStream getResponseBody() | |
| getResponseCode | back to summary |
|---|---|
| public int getResponseCode() | |
| getResponseHeaders | back to summary |
|---|---|
| public Headers getResponseHeaders() | |
| getServerImpl | back to summary |
|---|---|
| pack-priv ServerImpl getServerImpl() | |
| getSSLSession | back to summary |
|---|---|
| public SSLSession getSSLSession() | |
| isHeadRequest | back to summary |
|---|---|
| private boolean isHeadRequest() | |
| postExchangeFinished | back to summary |
|---|---|
| pack-priv void postExchangeFinished(boolean writefinished) Posts the ExchangeFinished event if not already posted.
If `writefinished` is true, marks the exchange as
| |
| sendResponseHeaders | back to summary |
|---|---|
| public void sendResponseHeaders(int rCode, long contentLen) throws IOException | |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(String name, Object value) | |
| setPrincipal | back to summary |
|---|---|
| pack-priv void setPrincipal(HttpPrincipal principal) | |
| setStreams | back to summary |
|---|---|
| public void setStreams(InputStream i, OutputStream o) | |
| write | back to summary |
|---|---|
| pack-priv void write(Headers map, OutputStream os) throws IOException | |
| writefinished | back to summary |
|---|---|
| pack-priv synchronized boolean writefinished() When true, writefinished indicates that all bytes expected by the client have been written to the response body outputstream, and that the response body outputstream has been closed. When all bytes have also been pulled from the request body input stream, this makes it possible to reuse the connection for the next request. | |