On 07/03/2022 17:45, Marc Boorshtein wrote:


    A better solution would be to modify the Handler to catch the
    sessionIdle event and check for how long the session was idling (the
    event will be received every second)



When you say "modify the Handler", does that require a change to Mina's code?  or is this something I can do  without changing Mina?

This can be done in the LdapProtocolHandler class, because it extends DemuxingIoHandler which extends IoHandlerAdapter which exposes :

    /**
     * {@inheritDoc}
     */
    @Override
public void sessionIdle(IoSession session, IdleStatus status) throws Exception {
        // Empty handler
    }


So just override this method to get the event.


--
*Emmanuel Lécharny - CTO* 205 Promenade des Anglais – 06200 NICE
T. +33 (0)4 89 97 36 50
P. +33 (0)6 08 33 32 61
[email protected] https://www.busit.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to