Top Description Inners Fields Constructors Methods
io.undertow.server.handlers

public Class PathTemplateHandler

extends Object
implements HttpHandler
Class Inheritance
All Implemented Interfaces
io.undertow.server.HttpHandler
Imports
io.undertow.server.HttpHandler, .HttpServerExchange, io.undertow.util.AttachmentKey, .PathTemplate, .PathTemplateMatcher, java.util.Map, .Set, java.util.stream.Collectors

A handler that matches URI templates
Author
Stuart Douglas
See Also
PathTemplateMatcher

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final HttpHandler
public static final AttachmentKey<PathTemplateHandler.PathTemplateMatch>
private final PathTemplateMatcher<HttpHandler>
private final boolean

Constructor Summary

AccessConstructor and Description
public
public
PathTemplateHandler(boolean rewriteQueryParameters)

public
public
PathTemplateHandler(HttpHandler next, boolean rewriteQueryParameters)

Method Summary

Modifier and TypeMethod and Description
public PathTemplateHandler
add(final String uriTemplate, final HttpHandler handler)

public void
handleRequest(HttpServerExchange
the HTTP request/response exchange
exchange
)

Implements io.undertow.server.HttpHandler.handleRequest.

Handle the request.

public PathTemplateHandler
remove(final String uriTemplate)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

nextback to summary
private final HttpHandler next
PATH_TEMPLATE_MATCHback to summary
public static final AttachmentKey<PathTemplateHandler.PathTemplateMatch> PATH_TEMPLATE_MATCH

Deprecated

Annotations
@Deprecated
See Also
io.undertow.util.PathTemplateMatch#ATTACHMENT_KEY
pathTemplateMatcherback to summary
private final PathTemplateMatcher<HttpHandler> pathTemplateMatcher
rewriteQueryParametersback to summary
private final boolean rewriteQueryParameters

Constructor Detail

PathTemplateHandlerback to summary
public PathTemplateHandler()
PathTemplateHandlerback to summary
public PathTemplateHandler(boolean rewriteQueryParameters)
PathTemplateHandlerback to summary
public PathTemplateHandler(HttpHandler next)
PathTemplateHandlerback to summary
public PathTemplateHandler(HttpHandler next, boolean rewriteQueryParameters)

Method Detail

addback to summary
public PathTemplateHandler add(final String uriTemplate, final HttpHandler handler)
handleRequestback to summary
public void handleRequest(HttpServerExchange exchange) throws Exception

Implements io.undertow.server.HttpHandler.handleRequest.

Doc from io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Parameters
exchange:HttpServerExchange

the HTTP request/response exchange

Annotations
@Override
removeback to summary
public PathTemplateHandler remove(final String uriTemplate)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
io.undertow.server.handlers back to summary

public final Class PathTemplateHandler.PathTemplateMatch

extends Object
Class Inheritance
  • java.lang.Object
  • io.undertow.server.handlers.PathTemplateHandler.PathTemplateMatch
Annotations
@Deprecated

Deprecated

See Also
io.undertow.util.PathTemplateMatch

Field Summary

Modifier and TypeField and Description
private final String
private final Map<String, String>

Constructor Summary

AccessConstructor and Description
public
PathTemplateMatch(String matchedTemplate, Map<String, String> parameters)

Method Summary

Modifier and TypeMethod and Description
public String
public Map<String, String>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

matchedTemplateback to summary
private final String matchedTemplate
parametersback to summary
private final Map<String, String> parameters

Constructor Detail

PathTemplateMatchback to summary
public PathTemplateMatch(String matchedTemplate, Map<String, String> parameters)

Method Detail

getMatchedTemplateback to summary
public String getMatchedTemplate()
getParametersback to summary
public Map<String, String> getParameters()