THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
package ipojo.example.hello.impl;
import ipojo.example.hello.Hello;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Provides;
/**
* Component implementing the Hello service.
**/
@Component(name="HelloImpl")
@Provides
public class HelloImpl implements Hello {
public String sayHello(String name) { return "hello " + name; }
}
|
...
- name : defines the component type name (mandatoryoptional, default = the class name)
- factory: defines the factory name (optional, default = "nofalse")
- immediate: defines the component type as immediate (optional, default = "false")
- architecture: enable the architecture exposition (optional, default = "false")
- propagation: enable configuration property propagation (on provided services) (optional, default = "false")
...
Code Block | ||||
---|---|---|---|---|
| ||||
<instance component="ipojo.example.hello.impl.HelloImpl"/>
<instance component="AnnotedHelloClient"/>
|
...