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
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public 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 © 2019 JBoss by Red Hat. All rights reserved.