Java 类com.facebook.swift.service.ThriftServer 实例源码

项目:hadoop-EAR    文件:TClientProxyProtocolServer.java   
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();
}
项目:zipkin    文件:ScribeCollector.java   
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));
}