mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Furbacher <pfurbac...@mac.com>
Subject Proxy server example -- introduce a random delay from client to proxied server?
Date Mon, 20 Aug 2007 19:39:10 GMT

I'm trying to modify the proxy server example to introduce a random delay to
messages coming from the client before they are sent to the server.  The
reason for doing this is that I have to simulate scrambling the order of
messages from client to server. 

At the moment, my idea is to wrap the incoming message (byte buffer) in an
object which also has a single-shot timer task, and then putting those
wrapper objects into a collection.  As an individual message times out in
the delay collection, it becomes "deliverable".  It seems as though I need
to create a "message needs sending" event, but I'm not sure how that could
be done.  

I'm new to the mina framework, and would appreciate a few pointers -- not
necessarily any code, just pointers as to what and how to think about this
within the context of the framework.



Paul Furbacher

View this message in context: http://www.nabble.com/Proxy-server-example----introduce-a-random-delay-from-client-to-proxied-server--tf4301103s16868.html#a12242579
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.

View raw message