...
Code Block |
---|
|
public class SomeComponent ... {
@Reference
@Target("one two three")
protected List<SomeService> listServices;
@Reference
protected Set<SomeService> setServices;
@Reference
protected SomeService[] setServices;
}
|
The above references can either be autowired or explicitly wired in a composite by using the Target
annotation. The above example demonstrates specifying multiple targets using the 'target' attribute Target
annotation. The same configuration can be done using XML:
Code Block |
---|
|
<component name="SomeComponent">
<implementation.java ..../>
<reference name="listServices" target="one two three"/>
</component>
|
...