public class SimpleHTTPServer extends Object
| Constructor and Description |
|---|
SimpleHTTPServer()
Constructs an HTTP server, which will run on a randomly selected port on the wildcard address.
|
SimpleHTTPServer(InetAddress bindAddress,
int port)
Constructs an HTTP server running on a specified address/port.
|
| Modifier and Type | Method and Description |
|---|---|
URL |
serve(URL stream)
Register a stream for serving.
|
void |
shutdown()
Closes this server, closing the server socket and all in-progress client connections.
|
void |
start()
Starts listening for client connections.
|
public SimpleHTTPServer()
throws IOException
IOExceptionpublic SimpleHTTPServer(InetAddress bindAddress, int port) throws IOException
bindAddress - the address to bind to.port - the port to bind to.IOExceptionpublic URL serve(URL stream)
stream - the URL to obtain the stream contents, which will be opened each time the stream is served.public void start()
public void shutdown()
Copyright © 2018 JBoss by Red Hat. All rights reserved.