Package com.bradmcevoy.http

Examples of com.bradmcevoy.http.HttpManager


      }
     
      public void init(ServletConfig config) throws ServletException {
          try {
              this.config = config;
              httpManager = new HttpManager(getResourceFactory(),
                  getCompressingHandler(),
                  getAuthService());
          } catch (Throwable ex) {
              logger.error("Exception starting milton servlet " + ex.getMessage());
              throw new RuntimeException(ex);
View Full Code Here


    authenticationService.setExtraHandlers(ssoHandlers);

    WebDavResponseHandler respHandler = new DefaultWebDavResponseHandler(authenticationService);

   
    httpManager = new HttpManager(ssoResourceFactory, respHandler, authenticationService);

  }
View Full Code Here

    private HttpManager httpManager;

    public void init( FilterConfig filterConfig ) throws ServletException {
        TResourceFactory fact = new TResourceFactory();
        httpManager = new HttpManager( fact );
    }
View Full Code Here

    return request.getHeader("If-None-Match");
  }

  public void process(FilterChain chain, Request request, Response response) {
    Request.Method method = request.getMethod();
    HttpManager manager = chain.getHttpManager();
    if (Request.Method.GET == method
        && StringUtils.isNotBlank(getIfNoneMatchHeader())) {
      try {
        process(manager, request, response);
      } catch (BadRequestException ex) {
        log.warn("BadRequestException: " + ex.getReason());
        manager.getResponseHandler().respondBadRequest(
            ex.getResource(), response, request);
      } catch (ConflictException ex) {
        log.warn("conflictException: " + ex.getMessage());
        manager.getResponseHandler().respondConflict(ex.getResource(),
            response, request, INTERNAL_SERVER_ERROR_HTML);
      } catch (NotAuthorizedException ex) {
        log.warn("NotAuthorizedException");
        manager.getResponseHandler().respondUnauthorised(
            ex.getResource(), response, request);
      } catch (Throwable e) {
        log.error("process", e);
        try {
          manager.getResponseHandler().respondServerError(request,
              response, INTERNAL_SERVER_ERROR_HTML);
        } catch (Throwable ex) {
          log
              .error(
                  "Exception generating server error response, setting response status to 500",
View Full Code Here

TOP

Related Classes of com.bradmcevoy.http.HttpManager

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.