You can make another service that inherits from those two, and then use the processor for that. There are examples of services that inherit from one another in the Thrift examples.
On Fri, Mar 18, 2011 at 12:13 AM, mickey.guoyun <[email protected]>wrote: > if i write more than one Service,like this: > #### test.thrift > service Service1{ > void service1() > } > service Service2{ > void service2() > } > > that i must write two classes to implement them? > if i wite two classes,how to bind them in server?because i found that one > server only can bind one service ,like this: > ##### server.code of Java > Processor processor=null; > TServerSocket socket=null; > TBinaryProtocol.Factory factory=null; > TServer server=null; > > processor=new Service1.Processor(new Service1Impl()); // my question > is here:how to bind the Serive2? > socket=new TServerSocket(7911); > factory=new TBinaryProtocol.Factory(); > server=new TThreadPoolServer(processor,socket,factory); > server.serve(); > > 2011-03-18 > > > > mickey.guoyun >
