本文整理汇总了Java中com.facebook.swift.service.ThriftServer类的典型用法代码示例。如果您正苦于以下问题:Java ThriftServer类的具体用法?Java ThriftServer怎么用?Java ThriftServer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ThriftServer类属于com.facebook.swift.service包,在下文中一共展示了ThriftServer类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TClientProxyProtocolServer
import com.facebook.swift.service.ThriftServer; //导入依赖的package包/类
public TClientProxyProtocolServer(ClientProxyCommons commons, ClientProxyService proxyService) {
this.proxyService = proxyService;
ThriftCodecManager codecManager = new ThriftCodecManager();
ThriftEventHandler eventHandler = new ThriftEventHandler();
ThriftServiceProcessor processor = new ThriftServiceProcessor(codecManager, Arrays.asList(
eventHandler), this);
server = new ThriftServer(processor, getServerConfig(commons.conf)).start();
}
示例2: ScribeCollector
import com.facebook.swift.service.ThriftServer; //导入依赖的package包/类
ScribeCollector(Builder builder) {
ScribeSpanConsumer scribe = new ScribeSpanConsumer(builder);
ThriftServiceProcessor processor =
new ThriftServiceProcessor(new ThriftCodecManager(), emptyList(), scribe);
server = new ThriftServer(processor, new ThriftServerConfig().setPort(builder.port));
}