You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (JIRA)" <ji...@apache.org> on 2012/06/25 11:44:43 UTC

[jira] [Updated] (SLING-2520) documentation for sending events needs improvement

     [ https://issues.apache.org/jira/browse/SLING-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radu Cotescu updated SLING-2520:
--------------------------------

    Issue Type: Improvement  (was: Bug)
    
> 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