public class HTTPServer
extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_HOST |
static int |
DEFAULT_PORT
The default port on which the server is running (8081).
|
| Constructor and Description |
|---|
HTTPServer()
Prepare a server on the given port - use run() to start it.
|
HTTPServer(int port)
Prepare a server on localhost on the given port - use run() to start it.
|
HTTPServer(int port,
boolean verbose)
Prepare a server on localhost on the given port - use run() to start it.
|
HTTPServer(int port,
boolean verbose,
Set<String> allowedIps)
Prepare a server on localhost on the given port - use run() to start it.
|
HTTPServer(int port,
boolean verbose,
String host,
Set<String> allowedIps)
Prepare a server on the given host and port - use run() to start it.
|
public static final String DEFAULT_HOST
public static final int DEFAULT_PORT
public HTTPServer()
public HTTPServer(int port)
PortBindingException - if we cannot bind to the given port, e.g. because something else is running therepublic HTTPServer(int port,
boolean verbose)
verbose - if true, the text to be checked will be displayed in case of exceptionsPortBindingException - if we cannot bind to the given port, e.g. because something else is running therepublic HTTPServer(int port,
boolean verbose,
Set<String> allowedIps)
verbose - if true, the text to be checked will be displayed in case of exceptionsallowedIps - the IP addresses from which connections are allowedPortBindingException - if we cannot bind to the given port, e.g. because something else is running therepublic HTTPServer(int port,
boolean verbose,
String host,
Set<String> allowedIps)
verbose - if true, the text to be checked will be displayed in case of exceptionshost - the host to bind to, e.g. "localhost" or InetAddress.anyLocalAddress()allowedIps - the IP addresses from which connections are allowedPortBindingException - if we cannot bind to the given port, e.g. because something else is running thereCopyright © 2005-2011 Daniel Naber