on-internet
← Community

How to decorate OSGi service and ensure that references bind newly decorated service?

Stack Overflow ·

I am using a framework with two OSGi services, one referencing the other using the default options of @Reference: @Component public class ConfigManagerImpl implements ConfigManager { @Override public Config getConfig() { /* ... */ } } @Component public class FrameworkManager { @Reference ConfigManager configManager; } These services are provided by a framework; their source code cannot be changed. Still, I want to change the behaviour of the provided ConfigManager by decorating it with my own, something like this: @Component(property = {"service.ranking:Integer=1000"}) public class DecoratedCo

Comments

Sign in or sign up to comment and upvote.

No comments yet.