Package fi.iki.elonen
Class NanoHTTPD.DefaultAsyncRunner
- java.lang.Object
-
- fi.iki.elonen.NanoHTTPD.DefaultAsyncRunner
-
- All Implemented Interfaces:
NanoHTTPD.AsyncRunner
- Enclosing class:
- NanoHTTPD
public static class NanoHTTPD.DefaultAsyncRunner extends java.lang.Object implements NanoHTTPD.AsyncRunner
Default threading strategy for NanoHTTPD.By default, the server spawns a new Thread for every incoming request. These are set to daemon status, and named according to the request number. The name is useful when profiling the application.
-
-
Field Summary
Fields Modifier and Type Field Description private long
requestCount
private java.util.List<NanoHTTPD.ClientHandler>
running
-
Constructor Summary
Constructors Constructor Description DefaultAsyncRunner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeAll()
void
closed(NanoHTTPD.ClientHandler clientHandler)
void
exec(NanoHTTPD.ClientHandler clientHandler)
java.util.List<NanoHTTPD.ClientHandler>
getRunning()
-
-
-
Field Detail
-
requestCount
private long requestCount
-
running
private final java.util.List<NanoHTTPD.ClientHandler> running
-
-
Method Detail
-
getRunning
public java.util.List<NanoHTTPD.ClientHandler> getRunning()
- Returns:
- a list with currently running clients.
-
closeAll
public void closeAll()
- Specified by:
closeAll
in interfaceNanoHTTPD.AsyncRunner
-
closed
public void closed(NanoHTTPD.ClientHandler clientHandler)
- Specified by:
closed
in interfaceNanoHTTPD.AsyncRunner
-
exec
public void exec(NanoHTTPD.ClientHandler clientHandler)
- Specified by:
exec
in interfaceNanoHTTPD.AsyncRunner
-
-