br.gov.frameworkdemoiselle.management.Notification demoiselleNotification = event.getNotification();
Object message = demoiselleNotification.getMessage();
Notification n;
if (AttributeChangeMessage.class.isInstance( message )){
AttributeChangeMessage attributeChangeMessage = (AttributeChangeMessage) message;
n = new AttributeChangeNotification(config.getNotificationMBeanName(), sequence.incrementAndGet()
, System.currentTimeMillis(), attributeChangeMessage.getDescription()
, attributeChangeMessage.getAttributeName(), attributeChangeMessage.getAttributeType().getSimpleName()
, attributeChangeMessage.getOldValue(), attributeChangeMessage.getNewValue());
}
else{
n = new Notification(NOTIFICATION_TYPE_GENERIC, config.getNotificationMBeanName(), sequence.incrementAndGet(), System.currentTimeMillis(), demoiselleNotification.getMessage().toString());
}
sendNotification(n);