thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Duxbury <br...@rapleaf.com>
Subject Re: multi service
Date Fri, 18 Mar 2011 14:01:04 GMT
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 <mickey.guoyun@gmail.com>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
>

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