directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Andersson <ja...@minq.se>
Subject [mina] IoHandlerFilter question
Date Tue, 25 Jan 2005 18:54:42 GMT
I have started to (try to) implement SSL IO filter for Mina, but
I'm somewhat confused regarding the API...

I implement the IoHandlerFilter interface and was planning on
saving a handler for SSL using IoSession.setAttachment().

In sessionOpened() i create my SSL handler so save information per
client session. I store my handler using session.setAttachment().

In dataRead() I get my SSL handler using session.getAttachment()
and use the handler to decrypt the read data.

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()?

/Janne


Mime
View raw message