Package br.gov.frameworkdemoiselle.management

Examples of br.gov.frameworkdemoiselle.management.NotificationManager.sendNotification()


          Class<? extends Object> attributeType = newValue != null ? newValue.getClass() : null;

          AttributeChangeNotification notification = new AttributeChangeNotification(bundle.getString(
              "management-notification-attribute-changed", propertyName, managedType.getType()
                  .getCanonicalName()), propertyName, attributeType, oldValue, newValue);
          notificationManager.sendNotification(notification);

        } catch (ConstraintViolationException ce) {
          throw ce;
        } catch (Exception e) {
          throw new ManagedInvokationException(bundle.getString("management-invoke-error", method.getName()), e);
View Full Code Here


          Class<? extends Object> attributeType = newValue != null ? newValue.getClass() : null;

          AttributeChangeNotification notification = new AttributeChangeNotification(bundle.getString(
              "management-notification-attribute-changed", propertyName, managedType.getType()
                  .getCanonicalName()), propertyName, attributeType, oldValue, newValue);
          notificationManager.sendNotification(notification);

        } catch (DemoiselleException de) {
          throw de;
        } catch (Exception e) {
          throw new DemoiselleException(bundle.getString("management-invoke-error", method.getName()), e);
View Full Code Here

              bundle.getString("management-notification-attribute-changed", propertyName, managedType.getType().getCanonicalName())
              , propertyName
              , attributeType
              , oldValue
              , newValue) );
          notificationManager.sendNotification(notification);

        } catch (ConstraintViolationException ce) {
          throw ce;
        } catch (Exception e) {
          throw new ManagedInvokationException(bundle.getString("management-invoke-error", method.getName()), e);
View Full Code Here

      Assert.fail();
    }

    // Manda a notificação pelo Demoiselle
    DefaultNotification n = new DefaultNotification("Notification test successful");
    notificationManager.sendNotification(n);

    // Se o componente funcionou, o Demoiselle propagou a notificação para o servidor MBean e o listener preencheu
    // o StringBuffer com nossa mensagem.
    Assert.assertEquals("Notification test successful", notificationBuffer.toString());
   
View Full Code Here

      Assert.fail();
    }

    // Manda a notificação pelo Demoiselle
    Notification notification = new DefaultNotification( new AttributeChangeMessage("Attribute Changed", "name", String.class, "Demoiselle 1", "Demoiselle 2") );
    notificationManager.sendNotification(notification);

    // Se o componente funcionou, o Demoiselle propagou a notificação para o servidor MBean e o listener preencheu
    // o StringBuffer com nossa mensagem.
    Assert.assertEquals("Attribute Changed: name = Demoiselle 2", notificationBuffer.toString());
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.