THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
@Component @Provides(specifications= {FooService.class, BarService.class}) public class ProvidesProperties implements FooService, BarService { @ServiceProperty(name = "foo") public int m_foo = 0; @ServiceProperty(name="bar", mandatory=true) public int m_bar; // ... } |
Center |
---|
Consuming services
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<component classname="my.consumer.Implementation">
<requires field="fs" />
<requires>
<callback type="bind" method="bind" />
<callback type="unbind" method="unbind" />
</requires>
</component>
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
@Component
public class Dependency {
@Requires
public FooService fs;
@Unbind
public void unbind(BazService bz) {
//...
}
@Bind
public void bind(BazService bz) {
// ...
}
//...
}
|
Center |
---|