On Fri, Aug 26, 2011 at 2:20 PM, Emmanuel Lecharny <[email protected]>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<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 ). > > > >> 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/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/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<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<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. > > Yeah I have to agree with Emmanuel on this one. It will become a PITA but perhaps some shade plugin magic can fix that? > For instance, ListenableFuture is already available in ActiveMQ ( > http://activemq.apache.org/**apollo/documentation/api/** > apollo-util/org/apache/**activemq/apollo/util/**ListenableFuture.html<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. > > >> 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. > > +1 > 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. > > +1 -- Best Regards, -- Alex
