directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Andersson <>
Subject Re: [mina] IoHandlerFilter question
Date Wed, 26 Jan 2005 17:26:02 GMT

> 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.



View raw message