Apache Mina , create my own IoSession: How to? <p>I'm playing for a few days with apache mina and I want to ask you how can I create by extending (or implementing) IoSession to create something like MyIoSession.</p> <p>The reason why I want to do this is because in the Handler class I want something like this:</p> <pre><code>public class MyHandler extends IoHandlerAdapter{ public void messageReceived( MyIoSession session, Object message ) throws Exception { // here I have MyIoSession instead of IoSession which will have more info something // like an unique ID } } </code></pre> <p>This way MyIoSession will have some unique ID and this way I'll identify which client is sending messages to server.</p> <p>Also if there are other better ways to achieve this feel free to tell me.</p> <p>Thanks</p>