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] Spring integration
Date Sat, 12 Nov 2005 05:50:05 GMT
Hi Niklas,

2005/11/8, Niklas Therning <niklas@trillian.se>:
>
> For bind one idea is to have a Binding class which simply maps a
> SocketAddress to an IoHandler. setBindings would take an array of
> Binding objects:
>
> public void setBindings(Binding[] bindings)
>
> I don't think it would be necessary to provide something similar for
> connect since connect is something you do programmatically at runtime.
> Please correct me if I'm wrong.


This additional method will make MINA more DI friendly definitely, but do we
really need this just for DI? Will this be useful also when we call this
method from our code? DI makes the configuration easier but in this case, it
doesn't help any API design IMHO. WDYT?

> For BlacklistFilter, I thought your Spring integration patch already
> > contains it. If it's not ready, I'll check in the fix. Please let me
> > know.
> >
> The patch for BlacklistFilter isn't included in the Spring integration
> patch I just uploaded to JIRA. The blacklist setter looks like this:
>
> + public void setBlacklist( InetAddress[] addresses )
> + {
> + blacklist.clear();
> + for( int i = 0; i < addresses.length; i++ )
> + {
> + blacklist.add( addresses[i] );
> + }
> + }
>
> Please add it if you think it looks ok.


I think it's good, but we'll also need another setter which accepts a
Collection of InetAddresses. We're not using Java 5, so we'll have to check
the type of all elements.

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

Mime
View raw message