On Aug 26, 2011, at 4:20 AM, Emmanuel Lecharny wrote: > On 8/26/11 12:57 PM, Julien Vermillard wrote: >> Hi ! >> I would like to use google guava for core MINA functionalities. >> >> Possible usages : >> Immutable List : >> http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/com/google/common/collect/ImmutableList.html >> convenient for storing filter list in an immutable fashion. > > You can make a list immutable by using Collections.unmodifiable( List ).
I'm thinking the same thing. >> Listenable futures : >> http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/com/google/common/util/concurrent/ListenableFuture.html >> http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/com/google/common/util/concurrent/AbstractListenableFuture.html >> http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/index.html?com/google/common/util/concurrent/Futures.html >> >> Convenient InetAddress methods avoiding DNS requests : >> http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/index.html?com/google/common/net/InetAddresses.html > > A soon as it brings some value, I have no problem with using a external lib. > However, if we can get the same result without dependency on another external > lib, that would be better, IMO. > > For instance, ListenableFuture is already available in ActiveMQ > (http://activemq.apache.org/apollo/documentation/api/apollo-util/org/apache/activemq/apollo/util/ListenableFuture.html). > Copyong the code from there inside MINA would be a possibility. We could copy it but I have already written the same stuff and checked it in. Happy to get rid of it if we find more extensive use for Guava. >> The HashMap tools are very cool and help you to keep your code concise : >> ex : >> in place of >> Map<K,V> myMap = new HashMap<K,V>(); >> you can write : >> Map<K,V> myMap = Maps.newHashMap(); > > Not really convinced aboyt the gain, here. Ditto. > Bottom line : adding a new dependency is an annoyance, to me. We have to add > the dependency to MINA, forcing our users to load it. Plus if we decide to > make MINA OSGi compliant, we will have to encapsulate Guava into a separate > project, maiking it an OSGi bundle. Ditto. Regards, Alan
