当前位置: 首页 > news >正文

用word怎么做首页网站广东外贸网站推广公司

用word怎么做首页网站,广东外贸网站推广公司,滨州百姓网免费发布信息,客户管理软件免费版当我们使用Thrift 通信的时候#xff0c;服务端有时候需要注册多个类#xff0c;去实现通信#xff0c;这时候我们就不能再使用单一Processor的方式#xff0c;就要使用多个Processor#xff0c;那么如何去实现呢#xff1f; 多个Process 服务端 public static void m…当我们使用Thrift 通信的时候服务端有时候需要注册多个类去实现通信这时候我们就不能再使用单一Processor的方式就要使用多个Processor那么如何去实现呢 多个Process 服务端 public static void main(String[] args) {try {AImpl aService new AImpl();BImpl bServicenew BImpl();TMultiplexedProcessor multiplexedProcessor new TMultiplexedProcessor();AService.ProcessorAImpl aProcessor new AService.Processor(aService);multiplexedProcessor.registerProcessor(aService, aProcessor);BService.ProcessorBImpl bProcessor new BService.Processor(bService);multiplexedProcessor.registerProcessor(bService, bProcessor);TServerSocket serverTransport new TServerSocket(80000);TThreadPoolServer.Args serverArgs new TThreadPoolServer.Args(serverTransport);serverArgs.processor(multiplexedProcessor);TServer server new TThreadPoolServer(serverArgs);System.out.println(Starting the multi-processor server...);server.serve();} catch (Exception e) {e.printStackTrace();System.out.println(e.getMessage());}}客户端 public static void main(String[] args) throws TException {TTransport transport new TSocket(localhost, 80000);transport.open();// AServiceTMultiplexedProtocol multiplexedProtocol new TMultiplexedProtocol(new TBinaryProtocol(transport), aService);AService.Client aClient new AService.Client(multiplexedProtocol);aClient.method();System.out.println(Calling AService method...);// BServicemultiplexedProtocol new TMultiplexedProtocol(new TBinaryProtocol(transport), bService);BService.Client bClient new BService.Client(multiplexedProtocol);BClient.method();System.out.println(Calling SystemLogService method...);transport.close();}这个Demo中我们要用到两个接口类那么A和B使用TMultiplexedProcessor 去注册两个Service启动服务。 单个Process 服务端 AImpl aService new AImpl();TServerSocket serverSocket new TServerSocket(90000);AService.ProcessorAImpl aProcessor new AService.Processor(aService);TThreadPoolServer.Args serverArg new TThreadPoolServer.Args(serverSocket);serverArg.processor(aProcessor);TThreadPoolServer server new TThreadPoolServer(serverArg);server.serve();客户端 TTransport transport new TSocket(localhost, 90000);transport.open();TBinaryProtocol protocol new TBinaryProtocol(transport);AService.Client aClient new AService.Client(protocol);aclient.method();附单个process的方式。
http://www.hkea.cn/news/14523049/

相关文章:

  • 好看的网站源码网站百度秒收
  • 青田县建设局官方网站建设工程施工合同属于
  • seo整站优化技术培训建站平台免代码
  • 深圳企业网站建设报价好玩的html代码
  • 简单的网站模板做网站用注册公司吗
  • 普通网站跟营销型网站的对比建站之星破解版
  • 全国网站建设公司有多少家wordpress做301重定向
  • 网站建设全程揭秘 光盘文件网页美工设计实训报告
  • 网站建设面对的问题网站怎么推广引流
  • 网站推广多少钱一年东莞阳光网直播平台
  • app ui设计网站著名的网站有哪些
  • 上海网站建设公司案例杭州seo哪家好
  • 天津餐饮网站建设北京模板网站建设
  • 不动产登记门户网站建设方案营销型网站策划怎么做
  • 网站模板内容怎么添加图片南昌市经济技术开发区
  • 烟台住房和城乡建设厅网站it运维是什么
  • 蓝田微网站建设抖音代运营 广州
  • 上海地区网站建设哪个网站科技新闻好
  • 如何建立学校网站基于网站的app开发
  • v2017网站开发福州百度快速优化排名
  • 家政类网站开发成本南京网站设计平台
  • 如何看网站空间问题信用湘潭网站
  • 家庭电脑做网站沂水网站设计
  • 网站建设过程和准备阶段网络营销的方法有哪些方式
  • 公司搭建一个网站需要多少钱江苏智能网站建设流程
  • 在线教育网站建设方案渭南经开区
  • 网站做一个多少钱建设网站公司前景
  • 有没有专门做中式的设计网站网络运维实习报告
  • 企业网站建设报价方案wordpress 新网页打开
  • 建设银行预约纪念钞网站wordpress搬家 打开404