You are right! My bad! I should have called the interface ' AVerySpecificButtonThatCanOnlyBeUsedWithThisParticularUsecase' ;) Luckily Java allows you to make use of more than one interface in your application so all the other valid reasons can be covered too ;)
On Thu, Feb 5, 2015 at 10:04 PM, Ferry Huberts <maili...@hupie.com> wrote: > > > On 05/02/15 21:21, Milen Dyankov wrote: > >> Agree to some extend. However here is what I meant with a stupid example. >> Say I have GUI where I can dynamically add buttons to perform operations >> on >> something. If I could do >> >> @AutoRegisterComponentsFromClassesImplementingMe >> public interface Button { >> void performActionOn (Something something); >> } >> >> public abstract class AbstractButton implements Button { >> // some common logic here >> } >> >> then I could say to my not-so-keen-about-osgi colleagues "You know what, >> just extend the AbstractButton, add your logic, build (tooling will make >> it >> a bundle), deploy and your button will appear in the UI"! Again it's NOT >> that there is some crucial missing feature in OSGi / DS but rather a >> matter >> of convenience! >> >> > And why is that adding just one tiny step ('put @Component on your class') > is too difficult? > > Besides, there are many valid reasons for implementing an interface and > _not_ exposing it as a service, also for your button case. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > For additional commands, e-mail: users-h...@felix.apache.org > > -- http://about.me/milen