wildfly/wildfly — pull request #4854 by jmesnil (2013-07-30 09:56:43+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
* all resources emit 3 types of notifications by default:
- resource-added
- resource-removed
- attribute-value-written
* 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
* emit notification for resource added/removed and attribute-value-written
directly from the AbstractOperationContext.
* emit notifications for server lifecycle notifications (server-started,
server-stopped, server-restarted, server-killed & server-destroyed)

Notification 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 execution).

---

This PR is a squashed version of #4507 when I removed all code related to ModelControllerClient.
The remaining notification code is internal to the server and does not leak to any client API (trough neither the native nor the HTTP APIs).
That's not very useful but it's a first step to provide notifications. In addition, we could also leverage this PR to put back JMX notifications on top of these internal notifications.