public class AdHocHttpServer extends Object implements AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
class |
AdHocHttpServer.StaticContentHandler |
static class |
AdHocHttpServer.StaticResponse |
| Constructor and Description |
|---|
AdHocHttpServer() |
AdHocHttpServer(File rootDir) |
| Modifier and Type | Method and Description |
|---|---|
URL |
addStaticContent(String target,
AdHocHttpServer.StaticResponse responseDef) |
void |
close() |
URL |
computeServerURL(String target) |
AdHocHttpServer.StaticContentHandler |
getHandler() |
String |
getHostname() |
int |
getPort() |
public URL computeServerURL(String target) throws MalformedURLException
MalformedURLExceptionpublic URL addStaticContent(String target, AdHocHttpServer.StaticResponse responseDef) throws MalformedURLException
MalformedURLExceptionpublic int getPort()
public String getHostname()
public void close()
throws Exception
close in interface AutoCloseableExceptionpublic AdHocHttpServer.StaticContentHandler getHandler()
Copyright © 2016 Github jjYBdx4IL Projects. All rights reserved.