[WFCORE-28] Add Global Resource Notifications * add global notifications for resources: * resource-added when a resource is added to the management model * resource-removed when a resource is removed from the management model * attribute-value-written for resources that allow to write attributes when an attribute value is successfully changed. This notification contains a data set composed of: * name - the name of the attribute that has been changed * old-value - the value of the attribute before it was changed * new-value - the value of the attribute after it was changed
The old-value and new-value are *not* resolved (an attribute that is undefined and has a default value will return "undefined" as its old-value).
[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 NotificationRegistry (exposed by the ModelController) to register/unregister notification handlers * add NotificationSupport to emit notifications during a managemenet operations (through OperationContext.emit(Notification))
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).
If the NotificationSupport is created with an ExecutorService, the delivery of notifications is non-blocking and will not block the remaining code path of the operation execution.