public class PathHandler extends Object implements HttpHandler
Constructor and Description |
---|
PathHandler() |
PathHandler(HttpHandler defaultHandler) |
Modifier and Type | Method and Description |
---|---|
PathHandler |
addPath(String path,
HttpHandler handler)
Adds a path and a handler for that path.
|
PathHandler |
clearPaths() |
Map<String,HttpHandler> |
getPaths() |
void |
handleRequest(HttpServerExchange exchange)
Handle the request.
|
PathHandler |
removePath(String path) |
public PathHandler(HttpHandler defaultHandler)
public PathHandler()
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public PathHandler addPath(String path, HttpHandler handler)
path
- The pathhandler
- The handlerpublic PathHandler removePath(String path)
public PathHandler clearPaths()
public Map<String,HttpHandler> getPaths()
Copyright © 2013 JBoss by Red Hat. All rights reserved.