Package com.baulsupp.kolja.widefinder.format

Examples of com.baulsupp.kolja.widefinder.format.HttpStatus


    if ("GET".equals(line.getValue(WideFinderConstants.ACTION))) {
      String url = (String) line.getValue(WideFinderConstants.URL);

      boolean isArticle = matchArticle(url);
      Long bytes = (Long) line.getValue(WideFinderConstants.SIZE);
      HttpStatus status = (HttpStatus) line.getValue(WideFinderConstants.STATUS);
      String client = (String) line.getValue(WideFinderConstants.IPADDRESS);
      String referrer = (String) line.getValue(WideFinderConstants.REFERRER);

      if (isArticle && status.isHit()) {
        articles.increment(url);
        clients.increment(client);

        if (isExternalReferrer(referrer)) {
          referrers.increment(referrer);
        }
      }

      if (bytes != null && status.equals(HttpStatus.SUCCESS_OK)) {
        byBytes.incrementBy(url, bytes);
      }

      if (status.equals(HttpStatus.CLIENT_ERROR_NOT_FOUND)) {
        _404.increment(url);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.baulsupp.kolja.widefinder.format.HttpStatus

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.