thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Meyer <>
Subject Re: About TThreadPoolServer
Date Fri, 07 May 2010 03:50:26 GMT
Yes, if I understood your question, you can accomplish this by providing
your own TProcessorFactory. Here's an example of the code in Java:

On Thu, May 6, 2010 at 5:06 PM, yh zhang <> wrote:

> The situation is like this:
>       We have several clients, let's say client1 and cient2, and each
> client will start a callback server to receive message from server, and of
> course, different callback servers should have different port number.
>       Inside server, we use TThreadPoolServer and we have a class(let's say
> CClient) to inherit handler class (let's say CalculatorHandler() in
> tutorial), in this way, we can create an instance of CClient and use it as
> a
> parameter to initial TThreadPoolServer  server. But the problem is that if
> we have several clients, we want to create our class instance for every
> server thread (Now it can only be created when initial TThreadedServer). Is
> there way to create new class instance (CClient) when server accepts a new
> client? (means that we want to create new class instance when each server
> thread is created)
>       Thanks very much.

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