public void service(ConnectionProtocol request)
  {
    RequestBaratine req = (RequestBaratine) request;
    
    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();
    
    try {
      if (_webApp != null) {
        thread.setContextClassLoader(_webApp.classLoader());
      }
      
      for (RouteBaratine route : _routes) {
        if (route.service(req)) {
          return;
        }
      }
      
      if (_routes.length > 0) {
        req.halt(HttpStatus.METHOD_NOT_ALLOWED);
      }
      else {
        req.halt(HttpStatus.NOT_FOUND);
        
      }
    } finally {
      thread.setContextClassLoader(oldLoader);
    }
  }
public void service ( ConnectionProtocol request ) { RequestBaratine req = ( RequestBaratine ) request ; Thread thread = Thread . currentThread ( ) ; ClassLoader oldLoader = thread . getContextClassLoader ( ) ; try { if ( _webApp != null ) { thread . setContextClassLoader ( _webApp . classLoader ( ) ) ; } for ( RouteBaratine route : _routes ) { if ( route . service ( req ) ) { return ; } } if ( _routes . length > 0 ) { req . halt ( HttpStatus . METHOD_NOT_ALLOWED ) ; } else { req . halt ( HttpStatus . NOT_FOUND ) ; } } finally { thread . setContextClassLoader ( oldLoader ) ; } }
Service a request.

@param request the http request facade
@param response the http response facade