directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinod Panicker <>
Subject Re: [mina] Filter design issue?
Date Fri, 29 Apr 2005 16:23:36 GMT
Hi Trustin,

On 4/29/05, Trustin Lee <> wrote:
> Hi Vinod,
> 2005/4/29, Vinod Panicker <>:
> > Trustin,
> >
> > There's still an issue.  Basically the SSL filter is part of
> > and if we are implementing a protocol, it
> > uses protocol filters which are in org.apache.mina.protocol.filter.
> > So in effect, a ProtocolHandler cannot set an SSLFilter on the
> > ProtocolSession.
> You can downcast your ProtocolSession to IoProtocolSession and then
> you can get the backing IoSession so that you can add SSLFilter.  :)

Missed that.  But IMO, since the ProtocolSession is actually using the
io package classes, why not have protocol as a sub-package of io?  And
also a proper inheritance tree that establishes this relationship. 
All protocols are doing io anyways.
> > Suggestion would be to combine all filters into a common hierarchy and
> > make them applicable to Session.
> We can lose type safety, if we do so.  So I didn't do like that
> intentionally.  WDYT?

I would still stand by having all filters applicable to sessions.  It
makes it much easier to use filters for different kind of sessions
wherever applicable.  IMO a ProtocolSession is nothing but a more
user-friendly version of IoSession.  Ditto with all Protocolxxx and

Do let me know if you have a different concept in mind.


View raw message