java - Proper way to handle async callbacks in Netty with ning client -
Here's my scenario: I have created a custom protocol on HTTP I started NetBI Server, in which the channel There are two custom handlers after:
pipelines.addlest ("decoder", new HTTPexecoder (1024, 10240, 32768)); Pipeline.Adlest ("Aggregator", New HTTP Chuck Aggregator (1048576)); Pipeline.Adlest ("Encoder", New HTTP Response Encoder ()); Pipeline.Adlest ("Defaulter", New HTTPS Content Compressor ()); Pipeline.Adlest ("Authenticator", new authentication handler ()); Pipeline.adult ("handler", new MyProtocolServiceHandler ()); A message of AuthenticationHandler (a SimpleChannelUpstreamHandler) has been received, I check to see if the user has an authentication: Header, and if so, then I call an external authentication service using an asynchronous client (one Com.we.p.p.cl.cl.esins.http client), which i pass to callback. When the authentication request comes back, I want to pass the ChannelHandlerContactAct and the original HttpMessage on the next handler. Right now, I'm just calling channel. Fire Message Reukwilla (References, Result, Remote Edender);
- But I think it is being executed by the thread of Async HTP client instead of one of the Nasty Container threads.
So my questions are:
1) Is there any way to return this request to the proper pool, and it is executed by the Native thread? Or ... 2) Do I need an extra set of threads to handle these requests without typing the encryption client?
Comments
Post a Comment