[jboss-jira] [JBoss JIRA] (WFLY-4952) Provide a way to correlate HTTP management requests

Heiko Braun (JIRA) issues at jboss.org
Fri Jul 17 03:21:04 EDT 2015


     [ https://issues.jboss.org/browse/WFLY-4952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Heiko Braun updated WFLY-4952:
------------------------------
    Description: 
{noformat}
public class CorrelationHandler implements HttpHandler {

    private static final HttpString HEADER = new HttpString("X-CORR-ID");

    private final HttpHandler next;

    public CorrelationHandler(HttpHandler next) {
        this.next = next;
    }

    @Override
    public void handleRequest(HttpServerExchange exchange) throws Exception {
        String corr = exchange.getRequestHeaders().getFirst(HEADER);
        if(corr != null) {
            exchange.getResponseHeaders().put(HEADER, corr);
        }
        next.handleRequest(exchange);

    }
}
{noformat}

  was:
public class CorrelationHandler implements HttpHandler {

    private static final HttpString HEADER = new HttpString("X-CORR-ID");

    private final HttpHandler next;

    public CorrelationHandler(HttpHandler next) {
        this.next = next;
    }

    @Override
    public void handleRequest(HttpServerExchange exchange) throws Exception {
        String corr = exchange.getRequestHeaders().getFirst(HEADER);
        if(corr != null) {
            exchange.getResponseHeaders().put(HEADER, corr);
        }
        next.handleRequest(exchange);

    }
}



> Provide a way to correlate HTTP management requests
> ---------------------------------------------------
>
>                 Key: WFLY-4952
>                 URL: https://issues.jboss.org/browse/WFLY-4952
>             Project: WildFly
>          Issue Type: Enhancement
>          Components: Domain Management
>            Reporter: Heiko Braun
>            Assignee: Heiko Braun
>             Fix For: 10.0.0.Beta1
>
>
> {noformat}
> public class CorrelationHandler implements HttpHandler {
>     private static final HttpString HEADER = new HttpString("X-CORR-ID");
>     private final HttpHandler next;
>     public CorrelationHandler(HttpHandler next) {
>         this.next = next;
>     }
>     @Override
>     public void handleRequest(HttpServerExchange exchange) throws Exception {
>         String corr = exchange.getRequestHeaders().getFirst(HEADER);
>         if(corr != null) {
>             exchange.getResponseHeaders().put(HEADER, corr);
>         }
>         next.handleRequest(exchange);
>     }
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list