Added cross link and annotation in example (#1145)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>pull/1146/head
parent
52a8064283
commit
743d40c558
|
@ -228,17 +228,18 @@ public class SomeComponentWantsToPost {
|
|||
eventPublisher.post(itemCommandEvent);
|
||||
}
|
||||
|
||||
protected void setEventPublisher(EventPublisher eventPublisher) {
|
||||
@Reference
|
||||
public void setEventPublisher(EventPublisher eventPublisher) {
|
||||
this.eventPublisher = eventPublisher;
|
||||
}
|
||||
|
||||
protected void unsetEventPublisher(EventPublisher eventPublisher) {
|
||||
public void unsetEventPublisher(EventPublisher eventPublisher) {
|
||||
this.eventPublisher = null;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The `EventPublisher` will be injected via OSGi Declarative Services.
|
||||
The `EventPublisher` will be injected via [OSGi Declarative Services](../osgi/osgids.html#declarative-services).
|
||||
|
||||
## Define new Event Types
|
||||
|
||||
|
|
Loading…
Reference in New Issue