public class VertxBrowserHelper.Server
extends java.lang.Object
Constructor and Description |
---|
Server(int port)
Instantiate a http server that listens only on localhost.
|
Modifier and Type | Method and Description |
---|---|
void |
addResource(java.lang.String path,
java.lang.Object resource,
java.lang.String contentType)
Add a resource to be served by the server.
|
void |
setResponse(java.lang.String response)
Set the response.
|
void |
shutdown()
Shut down the server, if running.
|
public Server(int port)
port
- The port numberpublic void addResource(java.lang.String path, java.lang.Object resource, java.lang.String contentType)
path
- The path to the resource.resource
- The resource to serve upon a request for this path.contentType
- The content type.public void setResponse(java.lang.String response)
response
- The response.public void shutdown()