Package org.apache.http.protocol

Examples of org.apache.http.protocol.HttpRequestHandlerResolver


   * @param request
   * @param context
   * @return HttpRequestHandler
   */
  public HttpRequestHandler lookup(HttpRequest request, HttpContext context) {
    HttpRequestHandlerResolver resolver = null;
    if (useVirtualHost) {
      String host = RequestUtils.getRequestHostURL(request, context);
      if (host == null) {
        host = DEFAULT_HOST;
      }
      resolver = hostHandler.get(host);
    }
    if (resolver == null) {
      resolver = hostHandler.get(DEFAULT_HOST);
    }
    if (LOG.isTraceEnabled() && resolver != null) {
      LOG.trace("handler: " + resolver.getClass().getName());
    }
    HttpRequestHandler handler = null;
    if (resolver != null) {
      handler = resolver.lookup(request.getRequestLine().getUri());
      if (handler == null) {
        handler = resolver.lookup("/");
      }
    }
    return handler;
  }
View Full Code Here

TOP

Related Classes of org.apache.http.protocol.HttpRequestHandlerResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.