wildfly/wildfly-core — pull request #23 by jmesnil (2014-07-10 13:27:14+00:00)
Title: [WFLY-266] Notification Support

* add notifications to AS7 resources description
notifications are described in :read-resource-description operation if
the notifications boolean is true
* NotificationDefinition let any resources describe the notifications
they can emit by registering them in the ManagementResourceRegistration
* add NotificationSupport to let AS7 resource register/unregister
notification handlers and emit notifications

Notifications emitted by OperationContext.emit(Notification) are
effectively sent at the end of the operation execution if it is
successful. This ensure that the order of notifications emitted by a
single OperationContext will be received in the same order (unless they
are emitted during the ResultHandler execuion).

JIRA: https://issues.jboss.org/browse/WFLY-266

---

This PR adds support for notifications to WildFly resources but does not add any (that'll be done in a later PR for [WFLY-3603](https://issues.jboss.org/browse/WFLY-3603). The added tests shows how notifications can be defined and emitted and notification handler registered.
However, I already modified the tests that checks the resources operations and notifications. They'll be filled with assertions on the notifications as we add them.

This PR is for WildFly 9 so I added notifications support directly in the API (ModelController, ResourceDefinition). When we backport this feature for 8.2, I am not sure whether I can also modify directly the API or create subinterface.