I saw in the apache camel source code that
public class DefaultCamelContext extends ServiceSupport implements CamelContext, Service
My question is why this definition since
public interface CamelContext extends Service
and also
public abstract class ServiceSupport implements Service
Shouldn't it be just
public class DefaultCamelContext extends ServiceSupport implements CamelContext
?
Is the explicit 'implements Service' needed and I am missing something? Generally is there any case where this might be needed?
It's not needed, but it emphasizes to anyone reading the code that it really does implement Service - it means they don't need to look at ServiceSupport to find that out.
I don't tend to do it myself, but there's nothing wrong with doing it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With