예제 #1
0
  public List<ExtractorResult<String>> extractUserGroup(List<HttpHeader> headerNames) {
    List<ExtractorResult<String>> results = new ArrayList<ExtractorResult<String>>();
    String user = "";
    String group = "";

    for (HttpHeader header : headerNames) {
      user = extractHeader(header.getId());
      if (!user.isEmpty()) {
        String quality = determineQuality(header);
        user += quality;
        group = header.getId() + quality;
        results.add(new ExtractorResult<String>(user, group));
      }
    }

    return results;
  }
예제 #2
0
 private String determineQuality(HttpHeader header) {
   return ";q=" + header.getQuality();
 }