On Fri, 2007-02-02 at 14:12 +0100, Stojce Dimski wrote:
> I am trying to combine examples of nio server and nio client to create a
> reverse proxy, and have a few questions regarding their integration.
> 
> 1) I need to wait in my server requestHandler handle method for client
> side to finish. I thought to use SessionRequest.waitFor() for this, is
> this right thing to do ? Also is this right approach or I missed
> something, in using those two together in this way ?

Hi Stojce,

SessionRequest#waitFor() will block the current thread and this is most
likely not what you want. You should rather use SessionRequestCallback
interface to get notified of the result of the connect request.

http://jakarta.apache.org/httpcomponents/httpcore/jakarta-httpcore-nio/xref/org/apache/http/nio/reactor/SessionRequestCallback.html
http://jakarta.apache.org/httpcomponents/httpcore/jakarta-httpcore-nio/xref/org/apache/http/nio/reactor/SessionRequest.html#55

> 
> 2) Later will need to have some kind of connection pooling for the
> client side and I would like to override 'DefaultClientIOEventDispatch'
> to use provided pool instead of always opening new connections... Is
> this ok ?
> 

There is an enhancement request for this feature 

https://issues.apache.org/jira/browse/HTTPCORE-25

I'll start working on it as soon as I have HTTPCORE-26 dealt with. It
may take a while, though. 

Cheers

Oleg


> Thanks,
> Stojce
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to