directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [mina] IoHandlerFilter question
Date Thu, 27 Jan 2005 01:53:32 GMT
Hi,

On Wed, 26 Jan 2005 18:26:02 +0100, Jan Andersson <janne@minq.se> wrote:
> 
> > On 2005-01-26, at 04:18, Trustin Lee wrote:
> > Filters should not set attachments because it can be overwritten by
> > user's IoHandler.  For example, IoProtocolAcceptor and
> > IoProtocolConnector stores its internal object as an attachment.  The
> > easiest solution is to maintain an IdentityHashMap whose key is
> > IoSession.
> >
> > Do you feel this solution is uncomfortable?  Then you could suggest me
> > better API. :)
> 
> No, I'm confortable with this. Simply didn't understand how attachments
> where meant to be used...
> 
> 
> >> But now to my question... I was planning on using the filterWrite()
> >> method to encrypt the data to be written. But this method do not
> >> provide
> >> an IoSession object. So I obviously can't use session.getAttachment()
> >> to get a handle to my SSL handler.
> >>
> >> I must be missing something here? What is the preferred way to
> >> handle session dependent state information, when implementing
> >> IoHandlerFilter.filterWrite()?
> >
> > It is my fault.  I had to include IoSession parameter.  I'll fix this
> > as soon as possible.  Thank you so much for pointing this out.
> 
> Great.
> 
> /Janne
> 
> 

I fixed this issue, and you retrieve the change from the repository now. :)

Cheers,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message