Hello,

I'm a Mina newbie and have been tasked with adding some logic to some
existing code. The code as it stands uses Mina to initially connect to a
server, then - utilising an inner class that extends IoHandlerAdapter -
it organises the sending of messages. The messages to be sent are
organised in a Map prior to sending and removed from the Map when a
response is received from the server.

The spec for the work is quite vague, for which I apologise. I need to
add some "retry" functionality to the code I have so that if, for
example, a network cable is disconnected, outbound messages will retry
for a period of time for a given number of attempts.

I've not done anything like this before in any programming task and am a
bit lost when it comes to picturing what I need to do in terms of new
functionality. The message to the server is written to the IOSession
(set when the server connection is established), which then waits until
a response is received before that response is processed. I'm guessing
that it is here somewhere that I would need to add appropriate
functionality.

I've had a look on the Net for similar examples but have yet to find
anything which does the same thing. If anyone has any pointers, I'd be
grateful. I'm not looking for complete solutions, just general ideas so
that I can get it clear in my head how the functionality will work. Then
I can code it appropriately myself.

Thanks for any advice,

Mark

Reply via email to