Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
java
java
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
xml
xml
<component name="SomeComponent">
   <implementation.java ..../>
   <reference name="listServices" target="one two three"/>
</component>

...