thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mickey.guoyun" <mickey.guo...@gmail.com>
Subject multi service
Date Fri, 18 Mar 2011 07:13:30 GMT
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 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message