All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.kristofa.brave.jersey.JerseyHttpRequest Maven / Gradle / Ivy

Go to download

Jersey integration that uses the brave api to submit client and server side span information.

There is a newer version: 4.13.6
Show newest version
package com.github.kristofa.brave.jersey;


import com.github.kristofa.brave.http.HttpClientRequest;
import com.sun.jersey.api.client.ClientRequest;

import java.net.URI;

public class JerseyHttpRequest implements HttpClientRequest {

    private final ClientRequest clientRequest;

    public JerseyHttpRequest(ClientRequest clientRequest) {
        this.clientRequest = clientRequest;
    }

    @Override
    public void addHeader(String header, String value) {
        clientRequest.getHeaders().add(header, value);
    }

    @Override
    public URI getUri() {
        return clientRequest.getURI();
    }

    @Override
    public String getHttpMethod() {
        return clientRequest.getMethod();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy