Search in sources :

Example 41 with RequestURI

use of com.tvd12.ezyhttp.server.core.request.RequestURI in project ezyhttp by youngmonkeys.

the class RequestHandlerManager method getMatchedURI.

public String getMatchedURI(HttpMethod method, String requestURI) {
    String matchedURI = null;
    if (handledURIs.contains(requestURI)) {
        matchedURI = requestURI;
    }
    if (matchedURI == null && requestURI != null) {
        URITree uriTree = uriTreeByMethod.get(method);
        matchedURI = uriTree.getMatchedURI(requestURI);
    }
    return matchedURI;
}
Also used : URITree(com.tvd12.ezyhttp.core.net.URITree)

Aggregations

RequestURI (com.tvd12.ezyhttp.server.core.request.RequestURI)36 Test (org.testng.annotations.Test)33 ComponentManager (com.tvd12.ezyhttp.server.core.manager.ComponentManager)29 BlockingServlet (com.tvd12.ezyhttp.server.core.servlet.BlockingServlet)29 HttpServletRequest (javax.servlet.http.HttpServletRequest)29 HttpServletResponse (javax.servlet.http.HttpServletResponse)29 ToString (lombok.ToString)29 RequestHandlerManager (com.tvd12.ezyhttp.server.core.manager.RequestHandlerManager)27 ServletOutputStream (javax.servlet.ServletOutputStream)24 RequestCookie (com.tvd12.ezyhttp.server.core.annotation.RequestCookie)22 Cookie (javax.servlet.http.Cookie)22 RequestInterceptor (com.tvd12.ezyhttp.server.core.interceptor.RequestInterceptor)10 RequestHandler (com.tvd12.ezyhttp.server.core.handler.RequestHandler)9 BodySerializer (com.tvd12.ezyhttp.core.codec.BodySerializer)4 DataConverters (com.tvd12.ezyhttp.core.codec.DataConverters)4 UnhandledErrorHandler (com.tvd12.ezyhttp.server.core.handler.UnhandledErrorHandler)4 ExceptionHandlerManager (com.tvd12.ezyhttp.server.core.manager.ExceptionHandlerManager)4 ArrayList (java.util.ArrayList)4 ResponseEntity (com.tvd12.ezyhttp.core.response.ResponseEntity)3 RequestHandlersImplementer (com.tvd12.ezyhttp.server.core.asm.RequestHandlersImplementer)3