@Retention(value=CLASS)
@Target(value=METHOD)
public @interface Start
Service activation/deactivation can be programatically controlled using LifecycleController.
@Component(properties={@Property(name="foo", value="bar")})
class X implements Z {
@ServiceDependency
OtherService m_dependency;
@Start
Map start() {
// Our Z Service is ready (all required dependencies have been satisfied), and is about to be
// registered into the OSGi registry. We return here an optional Map containing some extra-properties
// which will be appended to the properties supplied in the Component annotation.
return new HashMap() {{
put("foo2", "bar2");
put(Constants.SERVICE_RANKING, Integer.valueOf(10));
}};
}
}