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()voidhandleRequest(HttpServerExchange exchange) Handle the request.removeHost(String host) setDefaultHandler(HttpHandler defaultHandler)
-
Constructor Details
-
NameVirtualHostHandler
public NameVirtualHostHandler()
-
-
Method Details
-
handleRequest
Description copied from interface:HttpHandlerHandle the request.- Specified by:
handleRequestin interfaceHttpHandler- Parameters:
exchange- the HTTP request/response exchange- Throws:
Exception
-
getDefaultHandler
-
getHosts
-
setDefaultHandler
-
addHost
-
removeHost
-