[
https://issues.apache.org/jira/browse/SLING-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bertrand Delacretaz resolved SLING-2520.
----------------------------------------
Resolution: Fixed
I see that Jean-Christophe has added your example to
http://sling.apache.org/site/how-to-manage-events-in-sling.html, marking this
resolved, thanks for reporting!
Please cross-check and reopen this issue if needed.
> documentation for sending events needs improvement
> --------------------------------------------------
>
> Key: SLING-2520
> URL: https://issues.apache.org/jira/browse/SLING-2520
> Project: Sling
> Issue Type: Improvement
> Components: Documentation
> Reporter: Radu Cotescu
> Priority: Trivial
>
> The events documentation at
> http://sling.apache.org/site/how-to-manage-events-in-sling.html describes how
> to send and receive events. However, the paragraph "Sending Job Events" is a
> bit ambiguous. Although it clearly explains how to send events in the context
> of the "dropbox" example, it should state that in order to send an event a
> call to EventAdmin.sendEvent() should be enough.
> I propose the following change:
> "
> To send an event the following code can be used:
> public void sendEvent() {
> final Dictionary<String, Object> props = new Hashtable<String, Object>();
> props.put(JobUtil.PROPERTY_JOB_TOPIC, JOB_TOPIC);
> props.put("resourcePath", RESOURCE_PATH);
> final Event myEvent = new Event(JOB_TOPIC, props);
> eventAdmin.sendEvent(myEvent);
> }
> However, for our example the service needs to implement: [...]
> "
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira