diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/NotificationManagerImpl.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/NotificationManagerImpl.java new file mode 100644 index 0000000..7b04b61 --- /dev/null +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/NotificationManagerImpl.java @@ -0,0 +1,64 @@ +package br.gov.frameworkdemoiselle.internal.implementation; + +import java.io.Serializable; + +import javax.enterprise.event.Event; +import javax.enterprise.util.AnnotationLiteral; +import javax.inject.Inject; + +import br.gov.frameworkdemoiselle.internal.management.ManagementNotificationEventImpl; +import br.gov.frameworkdemoiselle.internal.management.qualifier.AttributeChange; +import br.gov.frameworkdemoiselle.internal.management.qualifier.Generic; +import br.gov.frameworkdemoiselle.management.AttributeChangeNotification; +import br.gov.frameworkdemoiselle.management.ManagementNotificationEvent; +import br.gov.frameworkdemoiselle.management.GenericNotification; +import br.gov.frameworkdemoiselle.management.NotificationManager; +import br.gov.frameworkdemoiselle.util.Beans; + + +@SuppressWarnings("serial") +public class NotificationManagerImpl implements NotificationManager,Serializable { + + @Inject + @Generic + private Event genericNotificationEvent; + + @Inject + @AttributeChange + private Event attributeChangeNotificationEvent; + + /** + * Sends a generic notification to all management clients. + * + * @param notification The notification to send + */ + public void sendNotification(GenericNotification notification) { + if (! AttributeChangeNotification.class.isInstance(notification) ){ + getGenericNotificationEvent().fire(new ManagementNotificationEventImpl(notification)); + } + else{ + getAttributeChangeNotificationEvent().fire(new ManagementNotificationEventImpl(notification)); + } + } + + @SuppressWarnings("unchecked") + private Event getGenericNotificationEvent() { + if (genericNotificationEvent==null){ + genericNotificationEvent = Beans.getReference(Event.class , new AnnotationLiteral() {}); + } + + return genericNotificationEvent; + } + + @SuppressWarnings("unchecked") + private Event getAttributeChangeNotificationEvent() { + if (attributeChangeNotificationEvent==null){ + attributeChangeNotificationEvent = Beans.getReference(Event.class , new AnnotationLiteral() {}); + } + + return attributeChangeNotificationEvent; + } + + + +} diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/ManagementNotificationEvent.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/ManagementNotificationEvent.java deleted file mode 100644 index 3beea45..0000000 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/ManagementNotificationEvent.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Demoiselle Framework - * Copyright (C) 2010 SERPRO - * ---------------------------------------------------------------------------- - * This file is part of Demoiselle Framework. - * - * Demoiselle Framework is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License version 3 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License version 3 - * along with this program; if not, see - * or write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301, USA. - * ---------------------------------------------------------------------------- - * Este arquivo é parte do Framework Demoiselle. - * - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação - * do Software Livre (FSF). - * - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português - * para maiores detalhes. - * - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título - * "LICENCA.txt", junto com esse programa. Se não, acesse - * ou escreva para a Fundação do Software Livre (FSF) Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. - */ -package br.gov.frameworkdemoiselle.internal.management; - -import br.gov.frameworkdemoiselle.management.Notification; -import br.gov.frameworkdemoiselle.management.NotificationManager; - -/** - * Event fired when a notification is sent by {@link NotificationManager}. - * Implementators can capture this event and be notified when the {@link NotificationManager} - * sends notifications, so they can pass the notification to the underlying technology. - * - * @author serpro - * - */ -public class ManagementNotificationEvent { - - private Notification notification; - - public ManagementNotificationEvent(Notification notification){ - this.notification = notification; - } - - public Notification getNotification() { - return notification; - } - - public void setNotification(Notification notification) { - this.notification = notification; - } -} diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/ManagementNotificationEventImpl.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/ManagementNotificationEventImpl.java new file mode 100644 index 0000000..15bc5b0 --- /dev/null +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/ManagementNotificationEventImpl.java @@ -0,0 +1,65 @@ +/* + * Demoiselle Framework + * Copyright (C) 2010 SERPRO + * ---------------------------------------------------------------------------- + * This file is part of Demoiselle Framework. + * + * Demoiselle Framework is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License version 3 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License version 3 + * along with this program; if not, see + * or write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301, USA. + * ---------------------------------------------------------------------------- + * Este arquivo é parte do Framework Demoiselle. + * + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação + * do Software Livre (FSF). + * + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português + * para maiores detalhes. + * + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título + * "LICENCA.txt", junto com esse programa. Se não, acesse + * ou escreva para a Fundação do Software Livre (FSF) Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. + */ +package br.gov.frameworkdemoiselle.internal.management; + +import br.gov.frameworkdemoiselle.management.GenericNotification; +import br.gov.frameworkdemoiselle.management.NotificationManager; + +/** + * Event fired when a notification is sent by {@link NotificationManager}. + * Implementators can capture this event and be notified when the {@link NotificationManager} + * sends notifications, so they can pass the notification to the underlying technology. + * + * @author serpro + * + */ +public class ManagementNotificationEventImpl implements br.gov.frameworkdemoiselle.management.ManagementNotificationEvent { + + private GenericNotification notification; + + public ManagementNotificationEventImpl(GenericNotification notification){ + this.notification = notification; + } + + public GenericNotification getNotification() { + return notification; + } + + public void setNotification(GenericNotification notification) { + this.notification = notification; + } +} diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/qualifier/AttributeChange.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/qualifier/AttributeChange.java index 8889cd2..87570c2 100644 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/qualifier/AttributeChange.java +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/qualifier/AttributeChange.java @@ -43,8 +43,8 @@ import java.lang.annotation.Target; import javax.inject.Qualifier; -import br.gov.frameworkdemoiselle.internal.management.ManagementNotificationEvent; import br.gov.frameworkdemoiselle.management.AttributeChangeNotification; +import br.gov.frameworkdemoiselle.management.ManagementNotificationEvent; /** * diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/qualifier/Generic.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/qualifier/Generic.java index 1c75fb0..7433d53 100644 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/qualifier/Generic.java +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/management/qualifier/Generic.java @@ -43,13 +43,13 @@ import java.lang.annotation.Target; import javax.inject.Qualifier; -import br.gov.frameworkdemoiselle.internal.management.ManagementNotificationEvent; -import br.gov.frameworkdemoiselle.management.Notification; +import br.gov.frameworkdemoiselle.management.ManagementNotificationEvent; +import br.gov.frameworkdemoiselle.management.GenericNotification; /** * * Enables {@link ManagementNotificationEvent} observers to trigger only with notifications - * of the base type {@link Notification}. + * of the base type {@link GenericNotification}. * * @author serpro * diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/AttributeChangeNotification.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/AttributeChangeNotification.java index 6a93f89..2001dcc 100644 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/AttributeChangeNotification.java +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/AttributeChangeNotification.java @@ -39,12 +39,12 @@ package br.gov.frameworkdemoiselle.management; /** * Special notification to denote an attribute has changed values. * - * @see Notification + * @see GenericNotification * * @author serpro * */ -public class AttributeChangeNotification extends Notification { +public class AttributeChangeNotification extends GenericNotification { private String attributeName; diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/GenericNotification.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/GenericNotification.java new file mode 100644 index 0000000..18dc443 --- /dev/null +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/GenericNotification.java @@ -0,0 +1,77 @@ +/* + * Demoiselle Framework + * Copyright (C) 2010 SERPRO + * ---------------------------------------------------------------------------- + * This file is part of Demoiselle Framework. + * + * Demoiselle Framework is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License version 3 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License version 3 + * along with this program; if not, see + * or write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301, USA. + * ---------------------------------------------------------------------------- + * Este arquivo é parte do Framework Demoiselle. + * + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação + * do Software Livre (FSF). + * + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português + * para maiores detalhes. + * + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título + * "LICENCA.txt", junto com esse programa. Se não, acesse + * ou escreva para a Fundação do Software Livre (FSF) Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. + */ +package br.gov.frameworkdemoiselle.management; + +/** + * + * Notification that can be sent by the {@link NotificationManager}. + * + * @author serpro + * + */ +public class GenericNotification { + + private Object message; + + public GenericNotification(){ + } + + public GenericNotification(Object message) { + super(); + this.message = message; + } + + + public Object getMessage() { + return message; + } + + + public void setMessage(Object message) { + this.message = message; + } + + + public Class getType() { + if (message!=null){ + return message.getClass(); + } + + return null; + } + +} diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/ManagementNotificationEvent.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/ManagementNotificationEvent.java new file mode 100644 index 0000000..b5145d9 --- /dev/null +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/ManagementNotificationEvent.java @@ -0,0 +1,15 @@ +package br.gov.frameworkdemoiselle.management; + +/** + * Event fired when a notification is sent by {@link NotificationManager}. + * Implementators can capture this event and be notified when the {@link NotificationManager} + * sends notifications, so they can pass the notification to the underlying technology. + * + * @author serpro + * + */ +public interface ManagementNotificationEvent { + + public GenericNotification getNotification(); + +} diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/Notification.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/Notification.java deleted file mode 100644 index 07d2c30..0000000 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/Notification.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Demoiselle Framework - * Copyright (C) 2010 SERPRO - * ---------------------------------------------------------------------------- - * This file is part of Demoiselle Framework. - * - * Demoiselle Framework is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License version 3 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License version 3 - * along with this program; if not, see - * or write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301, USA. - * ---------------------------------------------------------------------------- - * Este arquivo é parte do Framework Demoiselle. - * - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação - * do Software Livre (FSF). - * - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português - * para maiores detalhes. - * - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título - * "LICENCA.txt", junto com esse programa. Se não, acesse - * ou escreva para a Fundação do Software Livre (FSF) Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. - */ -package br.gov.frameworkdemoiselle.management; - -/** - * - * Notification that can be sent by the {@link NotificationManager}. - * - * @author serpro - * - */ -public class Notification { - - private Object message; - - public Notification(){ - } - - public Notification(Object message) { - super(); - this.message = message; - } - - - public Object getMessage() { - return message; - } - - - public void setMessage(Object message) { - this.message = message; - } - - - public Class getType() { - if (message!=null){ - return message.getClass(); - } - - return null; - } - -} diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/NotificationManager.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/NotificationManager.java index 95f3f39..9b02cce 100644 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/NotificationManager.java +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/management/NotificationManager.java @@ -36,23 +36,18 @@ */ package br.gov.frameworkdemoiselle.management; -import java.io.Serializable; - import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Event; import javax.enterprise.event.Observes; -import javax.enterprise.util.AnnotationLiteral; import javax.inject.Inject; -import br.gov.frameworkdemoiselle.internal.management.ManagementNotificationEvent; import br.gov.frameworkdemoiselle.internal.management.qualifier.AttributeChange; import br.gov.frameworkdemoiselle.internal.management.qualifier.Generic; import br.gov.frameworkdemoiselle.util.Beans; /** * - *

Central class to manage sending notifications to management clients. - * This class allows applications to send management notifications without + *

Central type to manage sending notifications to management clients. + * This interface allows applications to send management notifications without * knowledge of the technology used to send those notifications.

* *

To obtain an instance of the {@link NotificationManager} simply inject it in @@ -68,49 +63,13 @@ import br.gov.frameworkdemoiselle.util.Beans; * */ @ApplicationScoped -@SuppressWarnings("serial") -public class NotificationManager implements Serializable{ - - @Inject - @Generic - private Event genericNotificationEvent; - - @Inject - @AttributeChange - private Event attributeChangeNotificationEvent; +public interface NotificationManager { /** - * Sends a generic notification to all management clients. + * Sends a notification to all management clients. * * @param notification The notification to send */ - public void sendNotification(Notification notification) { - if (! AttributeChangeNotification.class.isInstance(notification) ){ - getGenericNotificationEvent().fire(new ManagementNotificationEvent(notification)); - } - else{ - getAttributeChangeNotificationEvent().fire(new ManagementNotificationEvent(notification)); - } - } + public void sendNotification(GenericNotification notification); - @SuppressWarnings("unchecked") - private Event getGenericNotificationEvent() { - if (genericNotificationEvent==null){ - genericNotificationEvent = Beans.getReference(Event.class , new AnnotationLiteral() {}); - } - - return genericNotificationEvent; - } - - @SuppressWarnings("unchecked") - private Event getAttributeChangeNotificationEvent() { - if (attributeChangeNotificationEvent==null){ - attributeChangeNotificationEvent = Beans.getReference(Event.class , new AnnotationLiteral() {}); - } - - return attributeChangeNotificationEvent; - } - - - } diff --git a/impl/core/src/test/java/management/NotificationTestCase.java b/impl/core/src/test/java/management/NotificationTestCase.java index 6108056..288389a 100644 --- a/impl/core/src/test/java/management/NotificationTestCase.java +++ b/impl/core/src/test/java/management/NotificationTestCase.java @@ -57,7 +57,7 @@ import br.gov.frameworkdemoiselle.annotation.Name; import br.gov.frameworkdemoiselle.internal.management.ManagedType; import br.gov.frameworkdemoiselle.internal.management.Management; import br.gov.frameworkdemoiselle.management.AttributeChangeNotification; -import br.gov.frameworkdemoiselle.management.Notification; +import br.gov.frameworkdemoiselle.management.GenericNotification; import br.gov.frameworkdemoiselle.management.NotificationManager; import br.gov.frameworkdemoiselle.util.Beans; import br.gov.frameworkdemoiselle.util.ResourceBundle; @@ -98,7 +98,7 @@ public class NotificationTestCase { */ @Test public void testSendGenericNotification(){ - manager.sendNotification(new Notification("Test Message")); + manager.sendNotification(new GenericNotification("Test Message")); DummyNotificationListener listener = Beans.getReference(DummyNotificationListener.class); Assert.assertEquals("Test Message", listener.getMessage()); } diff --git a/impl/core/src/test/java/management/testclasses/DummyNotificationListener.java b/impl/core/src/test/java/management/testclasses/DummyNotificationListener.java index 6b4d8ec..af11988 100644 --- a/impl/core/src/test/java/management/testclasses/DummyNotificationListener.java +++ b/impl/core/src/test/java/management/testclasses/DummyNotificationListener.java @@ -39,10 +39,10 @@ package management.testclasses; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.event.Observes; -import br.gov.frameworkdemoiselle.internal.management.ManagementNotificationEvent; import br.gov.frameworkdemoiselle.internal.management.qualifier.AttributeChange; import br.gov.frameworkdemoiselle.internal.management.qualifier.Generic; import br.gov.frameworkdemoiselle.management.AttributeChangeNotification; +import br.gov.frameworkdemoiselle.management.ManagementNotificationEvent; import br.gov.frameworkdemoiselle.management.NotificationManager; /** diff --git a/impl/extension/jmx/src/main/java/br/gov/frameworkdemoiselle/jmx/internal/NotificationBroadcaster.java b/impl/extension/jmx/src/main/java/br/gov/frameworkdemoiselle/jmx/internal/NotificationBroadcaster.java index 0c2b605..6eaf606 100644 --- a/impl/extension/jmx/src/main/java/br/gov/frameworkdemoiselle/jmx/internal/NotificationBroadcaster.java +++ b/impl/extension/jmx/src/main/java/br/gov/frameworkdemoiselle/jmx/internal/NotificationBroadcaster.java @@ -42,8 +42,8 @@ import javax.management.AttributeChangeNotification; import javax.management.Notification; import javax.management.NotificationBroadcasterSupport; -import br.gov.frameworkdemoiselle.internal.management.ManagementNotificationEvent; import br.gov.frameworkdemoiselle.jmx.configuration.JMXConfig; +import br.gov.frameworkdemoiselle.management.ManagementNotificationEvent; import br.gov.frameworkdemoiselle.management.NotificationManager; /** @@ -67,7 +67,7 @@ final class NotificationBroadcaster extends NotificationBroadcasterSupport imple private static final String NOTIFICATION_TYPE_GENERIC = "jmx.message"; protected void sendNotification( ManagementNotificationEvent event , JMXConfig config ) { - br.gov.frameworkdemoiselle.management.Notification demoiselleNotification = event.getNotification(); + br.gov.frameworkdemoiselle.management.GenericNotification demoiselleNotification = event.getNotification(); Notification n = new Notification(NOTIFICATION_TYPE_GENERIC, config.getNotificationMBeanName(), sequenceNumber++, System.currentTimeMillis(), demoiselleNotification.getMessage().toString()); sendNotification(n); } diff --git a/impl/extension/jmx/src/main/java/br/gov/frameworkdemoiselle/jmx/internal/NotificationEventListener.java b/impl/extension/jmx/src/main/java/br/gov/frameworkdemoiselle/jmx/internal/NotificationEventListener.java index f2ad079..6f0eac0 100644 --- a/impl/extension/jmx/src/main/java/br/gov/frameworkdemoiselle/jmx/internal/NotificationEventListener.java +++ b/impl/extension/jmx/src/main/java/br/gov/frameworkdemoiselle/jmx/internal/NotificationEventListener.java @@ -41,10 +41,10 @@ import java.io.Serializable; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.event.Observes; -import br.gov.frameworkdemoiselle.internal.management.ManagementNotificationEvent; import br.gov.frameworkdemoiselle.internal.management.qualifier.AttributeChange; import br.gov.frameworkdemoiselle.internal.management.qualifier.Generic; import br.gov.frameworkdemoiselle.jmx.configuration.JMXConfig; +import br.gov.frameworkdemoiselle.management.ManagementNotificationEvent; import br.gov.frameworkdemoiselle.management.NotificationManager; /** diff --git a/impl/extension/jmx/src/test/java/management/tests/internal/NotificationBroadcasterTestCase.java b/impl/extension/jmx/src/test/java/management/tests/internal/NotificationBroadcasterTestCase.java index edc4117..89b408f 100644 --- a/impl/extension/jmx/src/test/java/management/tests/internal/NotificationBroadcasterTestCase.java +++ b/impl/extension/jmx/src/test/java/management/tests/internal/NotificationBroadcasterTestCase.java @@ -61,7 +61,7 @@ import org.junit.runner.RunWith; import br.gov.frameworkdemoiselle.jmx.configuration.JMXConfig; import br.gov.frameworkdemoiselle.jmx.internal.MBeanManager; import br.gov.frameworkdemoiselle.management.AttributeChangeNotification; -import br.gov.frameworkdemoiselle.management.Notification; +import br.gov.frameworkdemoiselle.management.GenericNotification; import br.gov.frameworkdemoiselle.management.NotificationManager; import br.gov.frameworkdemoiselle.util.Beans; @@ -122,7 +122,7 @@ public class NotificationBroadcasterTestCase { } //Manda a notificação pelo Demoiselle - Notification n = new Notification("Notification test successful"); + GenericNotification n = new GenericNotification("Notification test successful"); notificationManager.sendNotification(n); //Se o componente funcionou, o Demoiselle propagou a notificação para o servidor MBean e o listener preencheu -- libgit2 0.21.2