public interface HttpServer
| Modifier and Type | Method and Description |
|---|---|
RequestHandlerManager |
addRequestHandler(Collection<String> methods,
String path,
RequestHandler requestHandler)
Adds a
RequestHandler on the given path and for the given methods. |
RequestHandlerManager |
addRequestHandler(String path,
RequestHandler requestHandler)
Adds a
RequestHandler on the given path and for all methods. |
void |
dispose()
Removes all secondary data to get rid of the server.
|
HttpConstants.Protocol |
getProtocol() |
ServerAddress |
getServerAddress() |
boolean |
isStopped() |
boolean |
isStopping() |
HttpServer |
start()
Binds the ServerSocket to the network interface and starts listening for requests.
|
HttpServer |
stop()
Unbinds the ServerSocket to the network interface and stops listening for requests.
|
HttpServer start() throws IOException
IOException - if there was a problem binding to the host and port specified.HttpServer stop()
void dispose()
ServerAddress getServerAddress()
HttpConstants.Protocol getProtocol()
boolean isStopping()
boolean isStopped()
RequestHandlerManager addRequestHandler(Collection<String> methods, String path, RequestHandler requestHandler)
RequestHandler on the given path and for the given methods.methods - a list of methods to matchpath - the path to matchrequestHandler - the handler to execute upon a matching requestRequestHandlerManager for the handlerRequestHandlerManager addRequestHandler(String path, RequestHandler requestHandler)
RequestHandler on the given path and for all methods.path - the path to matchrequestHandler - the handler to execute upon a matching requestRequestHandlerManager for the handlerCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.