io.undertow.server.handlers

## Class PathTemplateHandler

- java.lang.Object
- - io.undertow.server.handlers.PathTemplateHandler

All Implemented Interfaces:
  HttpHandler

    public class PathTemplateHandler
    extends Object
    implements HttpHandler

A handler that matches URI templates

Author:
  Stuart Douglas
See Also:
  `PathTemplateMatcher`

### Nested Class Summary

Nested Classes
`static class` `PathTemplateHandler.PathTemplateMatch` Deprecated.

### Field Summary

Fields
`static AttachmentKey<PathTemplateHandler.PathTemplateMatch>` `PATH_TEMPLATE_MATCH` Deprecated.

### Constructor Summary

Constructors
Constructor and Description
`PathTemplateHandler()`
`PathTemplateHandler(boolean rewriteQueryParameters)`
`PathTemplateHandler(HttpHandler next)`
`PathTemplateHandler(HttpHandler next, boolean rewriteQueryParameters)`

### Method Summary

All Methods Instance Methods Concrete Methods
`PathTemplateHandler` `add(String uriTemplate, HttpHandler handler)`
`void` `handleRequest(HttpServerExchange exchange)` Handle the request.
`PathTemplateHandler` `remove(String uriTemplate)`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### PATH_TEMPLATE_MATCH

    @Deprecated
    public static final AttachmentKey<PathTemplateHandler.PathTemplateMatch> PATH_TEMPLATE_MATCH

Deprecated.

See Also:
  `PathTemplateMatch.ATTACHMENT_KEY`

### Constructor Detail

#### PathTemplateHandler

    public PathTemplateHandler()

#### PathTemplateHandler

    public PathTemplateHandler(boolean rewriteQueryParameters)

#### PathTemplateHandler

    public PathTemplateHandler(HttpHandler next)

#### PathTemplateHandler

    public PathTemplateHandler(HttpHandler next,
                               boolean rewriteQueryParameters)

### Method Detail

#### handleRequest

    public void handleRequest(HttpServerExchange exchange)
                       throws Exception

Description copied from interface: `HttpHandler`
Handle the request.

Specified by:
  `handleRequest` in interface `HttpHandler`
Parameters:
  `exchange` - the HTTP request/response exchange
Throws:
  `Exception`

#### add

    public PathTemplateHandler add(String uriTemplate,
                                   HttpHandler handler)

#### remove

    public PathTemplateHandler remove(String uriTemplate)

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`