public class NameVirtualHostHandler extends Object implements HttpHandler
HttpHandler that implements virtual hosts based on the Host: http header
header.| Constructor and Description |
|---|
NameVirtualHostHandler() |
| Modifier and Type | Method and 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 JBoss by Red Hat. All rights reserved.