HttpHandlerpublic class NameVirtualHostHandler extends Object implements HttpHandler
HttpHandler that implements virtual hosts based on the Host: http header
header.| Constructor | Description |
|---|---|
NameVirtualHostHandler() |
| Modifier and Type | Method | Description |
|---|---|---|
NameVirtualHostHandler |
addHost(String host,
HttpHandler handler) |
|
HttpHandler |
getDefaultHandler() |
|
Map<String,HttpHandler> |
getHosts() |
|
void |
handleRequest(HttpServerExchange exchange) |
Handle the request.
|
NameVirtualHostHandler |
removeHost(String host) |
|
NameVirtualHostHandler |
setDefaultHandler(HttpHandler defaultHandler) |
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandlerhandleRequest in interface HttpHandlerexchange - the HTTP request/response exchangeExceptionpublic HttpHandler getDefaultHandler()
public Map<String,HttpHandler> getHosts()
public NameVirtualHostHandler setDefaultHandler(HttpHandler defaultHandler)
public NameVirtualHostHandler addHost(String host, HttpHandler handler)
public NameVirtualHostHandler removeHost(String host)
Copyright © 2018. All rights reserved.