public String getColumnText(Object element, int columnIndex) {
   if (!(element instanceof HeaderField)) return "";
   HeaderField headerField = (HeaderField) element;
   if (columnIndex == 0) return headerField.getHeaderName().toString();
   if (columnIndex == 1) return headerField.getValue();
   return "";
 }
Exemplo n.º 2
0
  @Override
  public Outcome handleRequest(Exchange exc) throws Exception {
    System.out.println("MyInterceptor invoked.");

    System.out.println("Request headers:");
    for (HeaderField headerField : exc.getRequest().getHeader().getAllHeaderFields())
      System.out.print(headerField.getHeaderName() + ": " + headerField.getValue());

    return Outcome.CONTINUE;
  }