[email protected] napsal(a):
Hi,
can someone explain me some stuff from org.apache.mina.example.sumup?

ClientSessionHandler extends from IoHandlerAdapter and the api doc says that "All 
methods do nothing by default." ClientSessionHandler does not override the 
sessionIdle method. So is it correct that the line:
private static final long CONNECT_TIMEOUT = 30*1000L; // 30 seconds
is never used?

Max
No, it is used in main() method. The connect timeout is a property of IoConnector, not of IoHandlerAdapter. SessionIdle may happen only on opened session (i.e. succesfuly connected). First you connect to server, and sessionCreated event happen at least. Only then you may get sessionIdle event. You drive that timeout by IoSessionConfig.set**IdleTime (being set in sessionCreated in the sumup example).

Pavel

Reply via email to