| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| pack-priv class | ServerImpl.
The Dispatcher is responsible for accepting any connections and then using those connections to processing any incoming requests. |
| pack-priv class | |
| pack-priv class | ServerImpl.
Responsible for closing connections that have been idle. |
| pack-priv class | ServerImpl.
Responsible for closing connections which have timed out while in REQUEST or RESPONSE state |
| Modifier and Type | Field and Description |
|---|---|
| private InetSocketAddress | |
| private final Set | |
| private boolean | |
| private ContextList | |
| pack-priv static boolean | |
| pack-priv ServerImpl. | |
| private Thread | |
| private List | |
| private int | |
| private Executor | |
| private final CountDownLatch | |
| private boolean | |
| private HttpsConfigurator | |
| pack-priv static final long | |
| pack-priv static final long | |
| private final Set | |
| private SelectionKey | |
| private final System. | |
| private final Object | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final long | |
| pack-priv static final long | |
| pack-priv static final long | |
| private final Set | |
| private String | |
| pack-priv static final long | |
| private final Set | |
| pack-priv static final boolean | |
| private final Set | |
| private ServerSocketChannel | |
| private Selector | |
| private SSLContext | |
| private boolean | |
| private volatile boolean | |
| private Timer | |
| private Timer | |
| private HttpServer |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public void | |
| private void | |
| public synchronized HttpContextImpl | |
| public synchronized HttpContextImpl | |
| pack-priv static synchronized void | |
| pack-priv static synchronized void | |
| pack-priv synchronized int | |
| private final boolean | |
| public InetSocketAddress | |
| pack-priv synchronized int | |
| public Executor | |
| public HttpsConfigurator | |
| pack-priv System. | |
| private static long | |
| pack-priv HttpServer | |
| public final boolean | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public synchronized void | |
| public synchronized void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | |
| public void | |
| public void | |
| pack-priv synchronized void | |
| public void | stop(int
maximum delay to wait for exchanges completion, in seconds delay)This method stops the server by adding a stop request event and waiting for the server until the event is triggered or until the maximum delay is triggered. |
| address | back to summary |
|---|---|
| private InetSocketAddress address | |
| allConnections | back to summary |
|---|---|
| private final Set<HttpConnection> allConnections | |
| bound | back to summary |
|---|---|
| private boolean bound | |
| contexts | back to summary |
|---|---|
| private ContextList contexts | |
| debug | back to summary |
|---|---|
| pack-priv static boolean debug | |
| dispatcher | back to summary |
|---|---|
| pack-priv ServerImpl. | |
| dispatcherThread | back to summary |
|---|---|
| private Thread dispatcherThread | |
| events | back to summary |
|---|---|
| private List<Event> events | |
| exchangeCount | back to summary |
|---|---|
| private int exchangeCount | |
| executor | back to summary |
|---|---|
| private Executor executor | |
| finishedLatch | back to summary |
|---|---|
| private final CountDownLatch finishedLatch | |
| https | back to summary |
|---|---|
| private boolean https | |
| httpsConfig | back to summary |
|---|---|
| private HttpsConfigurator httpsConfig | |
| IDLE_INTERVAL | back to summary |
|---|---|
| pack-priv static final long IDLE_INTERVAL | |
| IDLE_TIMER_TASK_SCHEDULE | back to summary |
|---|---|
| pack-priv static final long IDLE_TIMER_TASK_SCHEDULE | |
| idleConnections | back to summary |
|---|---|
| private final Set<HttpConnection> idleConnections | |
| listenerKey | back to summary |
|---|---|
| private SelectionKey listenerKey | |
| logger | back to summary |
|---|---|
| private final System. | |
| lolock | back to summary |
|---|---|
| private final Object lolock | |
| MAX_CONNECTIONS | back to summary |
|---|---|
| pack-priv static final int MAX_CONNECTIONS | |
| MAX_IDLE_CONNECTIONS | back to summary |
|---|---|
| pack-priv static final int MAX_IDLE_CONNECTIONS | |
| MAX_REQ_TIME | back to summary |
|---|---|
| pack-priv static final long MAX_REQ_TIME | |
| MAX_RSP_TIME | back to summary |
|---|---|
| pack-priv static final long MAX_RSP_TIME | |
| NEWLY_ACCEPTED_CONN_IDLE_INTERVAL | back to summary |
|---|---|
| pack-priv static final long NEWLY_ACCEPTED_CONN_IDLE_INTERVAL | |
| newlyAcceptedConnections | back to summary |
|---|---|
| private final Set<HttpConnection> newlyAcceptedConnections | |
| protocol | back to summary |
|---|---|
| private String protocol | |
| REQ_RSP_TIMER_SCHEDULE | back to summary |
|---|---|
| pack-priv static final long REQ_RSP_TIMER_SCHEDULE | |
| reqConnections | back to summary |
|---|---|
| private final Set<HttpConnection> reqConnections | |
| reqRspTimeoutEnabled | back to summary |
|---|---|
| pack-priv static final boolean reqRspTimeoutEnabled | |
| rspConnections | back to summary |
|---|---|
| private final Set<HttpConnection> rspConnections | |
| schan | back to summary |
|---|---|
| private ServerSocketChannel schan | |
| selector | back to summary |
|---|---|
| private Selector selector | |
| sslContext | back to summary |
|---|---|
| private SSLContext sslContext | |
| started | back to summary |
|---|---|
| private boolean started | |
| terminating | back to summary |
|---|---|
| private volatile boolean terminating | |
| timer | back to summary |
|---|---|
| private Timer timer | |
| timer1 | back to summary |
|---|---|
| private Timer timer1 | |
| wrapper | back to summary |
|---|---|
| private HttpServer wrapper | |
| ServerImpl | back to summary |
|---|---|
| pack-priv ServerImpl(HttpServer wrapper, String protocol, InetSocketAddress addr, int backlog) throws IOException | |
| addEvent | back to summary |
|---|---|
| pack-priv void addEvent(Event r) | |
| bind | back to summary |
|---|---|
| public void bind(InetSocketAddress addr, int backlog) throws IOException | |
| closeConnection | back to summary |
|---|---|
| private void closeConnection(HttpConnection conn) | |
| createContext | back to summary |
|---|---|
| public synchronized HttpContextImpl createContext(String path, HttpHandler handler) | |
| createContext | back to summary |
|---|---|
| public synchronized HttpContextImpl createContext(String path) | |
| dprint | back to summary |
|---|---|
| pack-priv static synchronized void dprint(String s) | |
| dprint | back to summary |
|---|---|
| pack-priv static synchronized void dprint(Exception e) | |
| endExchange | back to summary |
|---|---|
| pack-priv synchronized int endExchange() | |
| finished | back to summary |
|---|---|
| private final boolean finished() | |
| getAddress | back to summary |
|---|---|
| public InetSocketAddress getAddress() | |
| getExchangeCount | back to summary |
|---|---|
| pack-priv synchronized int getExchangeCount() | |
| getExecutor | back to summary |
|---|---|
| public Executor getExecutor() | |
| getHttpsConfigurator | back to summary |
|---|---|
| public HttpsConfigurator getHttpsConfigurator() | |
| getLogger | back to summary |
|---|---|
| pack-priv System. | |
| getTimeMillis | back to summary |
|---|---|
| private static long getTimeMillis(long secs) Converts and returns the passed | |
| getWrapper | back to summary |
|---|---|
| pack-priv HttpServer getWrapper() | |
| isFinishing | back to summary |
|---|---|
| public final boolean isFinishing() | |
| logReply | back to summary |
|---|---|
| pack-priv void logReply(int code, String requestStr, String text) | |
| markIdle | back to summary |
|---|---|
| pack-priv void markIdle(HttpConnection c) | |
| markNewlyAccepted | back to summary |
|---|---|
| pack-priv void markNewlyAccepted(HttpConnection c) | |
| removeContext | back to summary |
|---|---|
| public synchronized void removeContext(String path) throws IllegalArgumentException | |
| removeContext | back to summary |
|---|---|
| public synchronized void removeContext(HttpContext context) throws IllegalArgumentException | |
| requestCompleted | back to summary |
|---|---|
| pack-priv void requestCompleted(HttpConnection c) | |
| requestStarted | back to summary |
|---|---|
| pack-priv void requestStarted(HttpConnection c) | |
| responseCompleted | back to summary |
|---|---|
| pack-priv void responseCompleted(HttpConnection c) | |
| setExecutor | back to summary |
|---|---|
| public void setExecutor(Executor executor) | |
| setHttpsConfigurator | back to summary |
|---|---|
| public void setHttpsConfigurator(HttpsConfigurator config) | |
| start | back to summary |
|---|---|
| public void start() | |
| startExchange | back to summary |
|---|---|
| pack-priv synchronized void startExchange() | |
| stop | back to summary |
|---|---|
| public void stop(int delay) This method stops the server by adding a stop request event and waiting for the server until the event is triggered or until the maximum delay is triggered. This ensures that the server is stopped immediately after all exchanges are complete. HttpConnections will be forcefully closed if active exchanges do not complete within the imparted delay.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | execute(Runnable task)
Implements java. Executes the given command at some time in the future. |
| DefaultExecutor | back to summary |
|---|---|
| private DefaultExecutor() | |
| execute | back to summary |
|---|---|
| public void execute(Runnable task) Implements java. Doc from java. Executes the given command at some time in the future. The command
may execute in a new thread, in a pooled thread, or in the calling
thread, at the discretion of the | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ArrayList |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| private void | |
| pack-priv void | |
| public void |
| connsToRegister | back to summary |
|---|---|
| pack-priv final ArrayList<HttpConnection> connsToRegister | |
| Dispatcher | back to summary |
|---|---|
| pack-priv Dispatcher() | |
| handle | back to summary |
|---|---|
| public void handle(SocketChannel chan, HttpConnection conn) | |
| handleEvent | back to summary |
|---|---|
| private void handleEvent(Event r) | |
| handleException | back to summary |
|---|---|
| private void handleException(SelectionKey key, Exception e) | |
| reRegister | back to summary |
|---|---|
| pack-priv void reRegister(HttpConnection c) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv SocketChannel | |
| pack-priv HttpConnection | |
| pack-priv HttpContextImpl | |
| pack-priv HttpContextImpl | |
| pack-priv String | |
| pack-priv InputStream | |
| pack-priv OutputStream | |
| pack-priv boolean | |
| pack-priv ExchangeImpl |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public void | |
| pack-priv void |
| chan | back to summary |
|---|---|
| pack-priv SocketChannel chan | |
| connection | back to summary |
|---|---|
| pack-priv HttpConnection connection | |
| context | back to summary |
|---|---|
| pack-priv HttpContextImpl context | |
| ctx | back to summary |
|---|---|
| pack-priv HttpContextImpl ctx | |
| protocol | back to summary |
|---|---|
| pack-priv String protocol | |
| rawin | back to summary |
|---|---|
| pack-priv InputStream rawin | |
| rawout | back to summary |
|---|---|
| pack-priv OutputStream rawout | |
| rejected | back to summary |
|---|---|
| pack-priv boolean rejected | |
| tx | back to summary |
|---|---|
| pack-priv ExchangeImpl tx | |
| Exchange | back to summary |
|---|---|
| pack-priv Exchange(SocketChannel chan, String protocol, HttpConnection conn) throws IOException | |
| reject | back to summary |
|---|---|
| pack-priv void reject(int code, String requestStr, String message) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |
| sendReply | back to summary |
|---|---|
| pack-priv void sendReply(int code, boolean closeNow, String text) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | handle(HttpExchange exchange)
Implements com. Handle the given request and generate an appropriate response. |
| nextChain | back to summary |
|---|---|
| pack-priv Filter. | |
| LinkHandler | back to summary |
|---|---|
| pack-priv LinkHandler(Filter. | |
| handle | back to summary |
|---|---|
| public void handle(HttpExchange exchange) throws IOException Implements com. Doc from com. Handle the given request and generate an appropriate response.
See
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | run()
Implements abstract java. Implements java. The action to be performed by this timer task. |
| IdleTimeoutTask | back to summary |
|---|---|
| pack-priv IdleTimeoutTask() | |
| closeConnections | back to summary |
|---|---|
| private void closeConnections(Set<HttpConnection> connections, long idleInterval) | |
| run | back to summary |
|---|---|
| public void run() Implements abstract java. Implements java. Doc from java. The action to be performed by this timer task. | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | run()
Implements abstract java. Implements java. The action to be performed by this timer task. |
| ReqRspTimeoutTask | back to summary |
|---|---|
| pack-priv ReqRspTimeoutTask() | |
| run | back to summary |
|---|---|
| public void run() Implements abstract java. Implements java. Doc from java. The action to be performed by this timer task. | |