Package io.undertow.server.handlers
Class NameVirtualHostHandler
java.lang.Object
io.undertow.server.handlers.NameVirtualHostHandler
- All Implemented Interfaces:
HttpHandler
A
HttpHandler
that implements virtual hosts based on the Host:
http header
header.- Author:
- Stuart Douglas
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddHost
(String host, HttpHandler handler) getHosts()
void
handleRequest
(HttpServerExchange exchange) Handle the request.removeHost
(String host) setDefaultHandler
(HttpHandler defaultHandler)
-
Constructor Details
-
NameVirtualHostHandler
public NameVirtualHostHandler()
-
-
Method Details
-
handleRequest
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
getDefaultHandler
-
getHosts
-
setDefaultHandler
-
addHost
-
removeHost
-