You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Samaira Gupta <sa...@gmail.com> on 2012/07/23 16:24:38 UTC

how to get ServerSessionobject within each session thread

Hi ,

I want to know how can i get the ioSession or ServerSession object within
each session thread

Re: how to get ServerSessionobject within each session thread

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 7/23/12 4:24 PM, Samaira Gupta a écrit :
> Hi ,
>
> I want to know how can i get the ioSession or ServerSession object within
> each session thread
>
You obviusly have it. It's part of the parameters you get in the handler.

Did I missed something, or you'd like to be a bit more explicit about 
your need ?

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: how to get ServerSessionobject within each session thread

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 7/23/12 4:24 PM, Samaira Gupta a écrit :
> Hi ,
>
> I want to know how can i get the ioSession or ServerSession object within
> each session thread
>
Do *not* post mails on every mailing list you know. This is a waste of 
our time...

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: how to get ServerSessionobject within each session thread

Posted by Kanupriya Dadariya <ka...@gmail.com>.
The SessionAware interface can be implemented . It has the setSession
method which has serverSession . IoSession can be obtained from it

On Fri, Jul 27, 2012 at 10:47 PM, Emmanuel Lécharny <el...@gmail.com>wrote:

> Le 7/27/12 6:01 PM, Sami a écrit :
>
>  The question is how to get the iosession Object. Once we have it we can
>> store it
>> for further use. For example, say we have EchoShell.With each EchoShell we
>> would have an ioSession associated and within EchoShell class I want to
>> use this
>> ioSession object.
>>
>>
>>
>>
>>  The IoSession is available in the IoHandler events :
>
> ...
>     void messageReceived(IoSession session, Object message) throws
> Exception;
> ...
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>

Re: how to get ServerSessionobject within each session thread

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 7/27/12 6:01 PM, Sami a écrit :
> The question is how to get the iosession Object. Once we have it we can store it
> for further use. For example, say we have EchoShell.With each EchoShell we
> would have an ioSession associated and within EchoShell class I want to use this
> ioSession object.
>
>
>
>
The IoSession is available in the IoHandler events :

...
     void messageReceived(IoSession session, Object message) throws 
Exception;
...

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: how to get ServerSessionobject within each session thread

Posted by Sami <sa...@gmail.com>.
The question is how to get the iosession Object. Once we have it we can store it 
for further use. For example, say we have EchoShell.With each EchoShell we 
would have an ioSession associated and within EchoShell class I want to use this 
ioSession object. 





Re: how to get ServerSessionobject within each session thread

Posted by webgeekman <we...@gmail.com>.
You can save the ioSession of each thread into a Map (A thread safe Map)  and make a unique key to every session.  

Hope it helps you.

From: Samaira Gupta
Date: 2012-07-23 22:54
To: users; dev
Subject: how to get ServerSessionobject within each session thread
Hi ,

I want to know how can i get the ioSession or ServerSession object within
each session thread