
com.github.kristofa.brave.http.HttpServerResponseAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brave-http Show documentation
Show all versions of brave-http Show documentation
Abstraction that makes it easier to implement brave in http clients and servers.
The newest version!
package com.github.kristofa.brave.http;
import java.util.Collection;
import java.util.Collections;
import com.github.kristofa.brave.KeyValueAnnotation;
import com.github.kristofa.brave.ServerResponseAdapter;
/**
* @deprecated Replaced by {@code HttpServerParser} from brave-http
*/
@Deprecated
public class HttpServerResponseAdapter implements ServerResponseAdapter {
private final HttpResponse response;
public HttpServerResponseAdapter(HttpResponse response)
{
this.response = response;
}
@Override
public Collection responseAnnotations() {
return Collections.singleton(KeyValueAnnotation.create(
"http.status_code", String.valueOf(response.getHttpStatusCode())));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy