当前位置: 首页>>代码示例>>Java>>正文


Java AsyncFrameBuffer类代码示例

本文整理汇总了Java中org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer的典型用法代码示例。如果您正苦于以下问题:Java AsyncFrameBuffer类的具体用法?Java AsyncFrameBuffer怎么用?Java AsyncFrameBuffer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AsyncFrameBuffer类属于org.apache.thrift.server.AbstractNonblockingServer包,在下文中一共展示了AsyncFrameBuffer类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: verifyServerTraces

import org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer; //导入依赖的package包/类
@Override
public void verifyServerTraces(PluginTestVerifier verifier) throws Exception {
    final InetSocketAddress actualServerAddress = super.environment.getServerAddress();
    verifier.verifyTraceCount(2);
    Method process = TBaseAsyncProcessor.class.getDeclaredMethod("process", AsyncFrameBuffer.class);
    // RootSpan
    verifier.verifyTrace(root("THRIFT_SERVER", // ServiceType,
            "Thrift Server Invocation", // Method
            "com/navercorp/pinpoint/plugin/thrift/dto/EchoService/echo", // rpc
            actualServerAddress.getHostName() + ":" + actualServerAddress.getPort(), // endPoint
            actualServerAddress.getHostName() // remoteAddress
    ));
    // SpanEvent - TBaseAsyncProcessor.process
    verifier.verifyTrace(event("THRIFT_SERVER_INTERNAL", process));
    verifier.verifyTraceCount(0);
}
 
开发者ID:naver,项目名称:pinpoint,代码行数:17,代码来源:AsyncEchoTestServer.java

示例2: before

import org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer; //导入依赖的package包/类
@Override
public void before(Object target, Object[] args) {
    if (isDebug) {
        logger.beforeInterceptor(target, args);
    }
    // process(final AsyncFrameBuffer fb)
    if (args.length != 1) {
        return;
    }
    // Set server markers
    if (args[0] instanceof AsyncFrameBuffer) {
        AsyncFrameBuffer frameBuffer = (AsyncFrameBuffer)args[0];
        attachMarkersToInputProtocol(frameBuffer.getInputProtocol(), true);
    }

}
 
开发者ID:naver,项目名称:pinpoint,代码行数:17,代码来源:TBaseAsyncProcessorProcessInterceptor.java

示例3: after

import org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer; //导入依赖的package包/类
@Override
public void after(Object target, Object[] args, Object result, Throwable throwable) {
    if (isDebug) {
        logger.afterInterceptor(target, args, result, throwable);
    }
    // Unset server markers
    if (args[0] instanceof AsyncFrameBuffer) {
        AsyncFrameBuffer frameBuffer = (AsyncFrameBuffer)args[0];
        attachMarkersToInputProtocol(frameBuffer.getInputProtocol(), false);
    }
    final Trace trace = this.traceContext.currentRawTraceObject();
    if (trace == null) {
        return;
    }
    this.traceContext.removeTraceObject();
    if (trace.canSampled()) {
        try {
            processTraceObject(trace, target, args, throwable);
        } catch (Throwable t) {
            logger.warn("Error processing trace object. Cause:{}", t.getMessage(), t);
        } finally {
            trace.close();
        }
    }
}
 
开发者ID:naver,项目名称:pinpoint,代码行数:26,代码来源:TBaseAsyncProcessorProcessInterceptor.java

示例4: getResultHandler

import org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer; //导入依赖的package包/类
public AsyncMethodCallback<Void> getResultHandler(
		final AsyncFrameBuffer fb, final int seqid) {
	final org.apache.thrift.AsyncProcessFunction fcall = this;
	return new AsyncMethodCallback<Void>() {
		public void onComplete(Void o) {
		}

		public void onError(Exception e) {
		}
	};
}
 
开发者ID:DDTH,项目名称:ddth-thriftpool,代码行数:12,代码来源:FacebookService.java


注:本文中的org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。