What I want to to is:

- create a mina client
- connect to another public socket server
- send something to that server
- if that server sends a response message within 30 seconds, my app will
continue ...
- if not my app will end the connection with that server, I don't want to
wait forever

Do I need Timer/TimerTask for this?  What is recommended way to do that?

Appreciate any help!


Coding Horse wrote:
> 
> I deadly want to know in which case I "have to use java.util.Timer and
> TimerTask instead of mina provided classes".  But that link seems broken
> :-(
> 
> 
> Paul Chen wrote:
>> 
>> Hi, folks,
>> 
>> http://directory.apache.org/subprojects/mina/faq.html#support
>> 
>> says:
>> 
>> ---
>> You can't use sessionIdle event simply here. You'll have to use
>> java.util.Timer and java.util.TimerTask (or OpenSymphony
>> Quartz<http://www.opensymphony.com/quartz/>as an alternative).
>> Schedule a timeout task to be executed on timeout
>> situation for each request message, and cancel it when you receive the
>> corresponding response message.
>> ---
>> 
>> Then when is sessionIdle being used?
>> 
>> Thanks for comments
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/sessionIdle-vs.-java.util.Timer-tf2697392.html#a9320628
Sent from the mina dev mailing list archive at Nabble.com.

Reply via email to