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

网站标题怎么隔开什么网站可以做英语题

网站标题怎么隔开,什么网站可以做英语题,英文商城网站,设计师招聘网站推荐当我们使用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.w-s-a.com/news/629956/

相关文章:

  • 贵阳好的网站建设免费正能量网站下载ww
  • 免费学习的网站平台自建站seo如何做
  • 海南三亚做网站公众号版面设计创意
  • 学校网站建设目的与意义合肥网页定制
  • 网站查询地址网站建设与维护费用
  • 做网站哪些软件比较好合肥外贸网站建设公司
  • 建网站需要哪些条件专业网站设计报价
  • 定制网站开发技术化妆品的网站布局设计图片大全
  • 网站模糊设计发布产品的免费平台有哪些
  • 网站建站什么目录桂林网站建设内容
  • 光明新区城市建设局网站长沙营销型网站制作费用
  • 网站建设制度制定wordpress主题哥
  • 门户网站的种类php网站开发实训心得
  • 流程图制作网页网络优化seo
  • 个人公益网站怎么制作wordpress flat theme
  • 做营销型网站的公司篇高端网站愿建设
  • 五莲网站建设维护推广凡科做网站的方法
  • 山东省住房建设厅网站首页网站文章更新怎么通知搜索引擎
  • 商务网站的可行性分析包括大流量网站 优化
  • 推广网站有效的方法网站数据统计
  • 自建视频网站WordPress数据库添加管理员
  • 新民电商网站建设价格咨询网站建设高效解决之道
  • 做网站需要哪些步骤网站设计介绍
  • 物流网站制作目的国外中文网站排行榜单
  • 苏州网站建设招标网站ftp的所有权归谁
  • 未央免费做网站河间网站建设
  • 酒庄企业网站app制作多少钱一个
  • 西安模板建网站网站如何做直播轮播
  • 网站功能需求表百度怎么投放自己的广告
  • 如何免费制作网站网站icp备案费用