On Tue, Jun 09, 2009 at 05:12:29PM +0200, Pasquiers Gwenhael wrote:
> Hi,
> 
> We are currently using HttpCore (non-NIO) in some test application; we
> have a growing number of connection so I'm trying to use the http.nio
> libraries instead.
> 
> FYI, this tool "executes" XML script describing http callflows.
> 
> 
> I hope I'll be clear enough:
> 
> For now I'm doing the client side, I'm using :
> 
> DefaultConnectingIOReactor
>   - DefaultClientIOEventDispatch 
>       - BufferingHttpClientHandler
>           - HttpProcessor (custom, does nothing)
>           - HttpRequestExecutionHandler (custom)
> 
> I do manage to establish a connection; i get a call to
> HttpRequestExecutionHandler.submitRequest(...) and if I, for testing
> I return a request there it sends it, nice.
> 
> However when I establish this connection I do not know yet the requests
> I will have to send, so I have to return null in submitRequest(...);
> then submitRequest() isn't called anymore by the lower layers.
> 
> My problem is that I did not find how to trigger that event latter
> in order to send my requests once I know what they are. Or any other
> way to send requests when "I" want to.
> 

IOControl#requestOutput() will cause the event to re-fire. The IOControl
interface is implemetned by all non-blocking connection classes and its
instances are thread safe.

Here is an example that demonstrates a simple strategy for managing
non-blocking connections on the client side using HttpCore API.

http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClientConnManagement.java

Hope this helps

Oleg


> I don't know if I'm going the wrong way (not using the right classes?)
> or if it is in fact something that is not that simple.
> 
> Thanks in advance for your help.
> 
> Gwenha?l?PASQUIERS
> 
> DEVOTEAM?/?BU?Telecom?/?Developer
> Email?:[email protected] 
> 
> 
> ---------------------------------------------------------------------
> 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