本文整理汇总了Java中com.github.kristofa.brave.http.HttpServerRequest类的典型用法代码示例。如果您正苦于以下问题:Java HttpServerRequest类的具体用法?Java HttpServerRequest怎么用?Java HttpServerRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HttpServerRequest类属于com.github.kristofa.brave.http包,在下文中一共展示了HttpServerRequest类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: preCall
import com.github.kristofa.brave.http.HttpServerRequest; //导入依赖的package包/类
/**
* Intercepts the server request flow and extract request information
* to be published to the Zipkin server for tracing.
*/
@Override
public boolean preCall(Request request, Response responder, ServiceMethodInfo serviceMethodInfo) throws Exception {
serviceMethodInfo.setAttribute(RESPONDER_ATTRIBUTE, responder);
HttpServerRequest req = new TraceableHttpServerRequest(request);
HttpServerRequestAdapter reqAdapter = new HttpServerRequestAdapter(req, new DefaultSpanNameProvider());
reqInterceptor.handle(reqAdapter);
return true;
}
示例2: getSpanNameFromHeader
import com.github.kristofa.brave.http.HttpServerRequest; //导入依赖的package包/类
private String getSpanNameFromHeader(HttpServerRequest httpServerRequest) {
return httpServerRequest.getHttpHeaderValue(RpcAttachment.SpanName.getName());
}
示例3: ZipkinWebServerRequestAdapter
import com.github.kristofa.brave.http.HttpServerRequest; //导入依赖的package包/类
public ZipkinWebServerRequestAdapter(final HttpServerRequest serverRequest, final SpanNameProvider spanNameProvider) {
super(serverRequest, spanNameProvider);
this.serverRequest = serverRequest;
}
示例4: ZipkinHttpServerRequest
import com.github.kristofa.brave.http.HttpServerRequest; //导入依赖的package包/类
protected ZipkinHttpServerRequest(final io.vertx.core.http.HttpServerRequest request) {
this.request = request;
}