Examples of RelationNotification


Examples of javax.management.relation.RelationNotification

    public void triggerRelationNotification() throws Exception {
        List<ObjectName> list = new ArrayList<ObjectName>();
        for (int i = 1; i <= 3; i++) {
            list.add(new ObjectName("TestDomain", "name", "mbean-" + i));
        }
        RelationNotification n = new RelationNotification(RelationNotification.RELATION_BASIC_CREATION,
                new ObjectName("TestDomain", "name", "source"), mSequence++, mTimestamp,
                "relation message",
                "relation-id",
                "relation.type",
                new ObjectName("TestDomain", "name", "foo"),
View Full Code Here

Examples of javax.management.relation.RelationNotification

                    .withDerivedGauge(String.valueOf(mn.getDerivedGauge()))
                    .withObservedAttribute(mn.getObservedAttribute())
                    .withObservedObject(String.valueOf(mn.getObservedObject()))
                    .withTrigger(String.valueOf(mn.getTrigger()));
        } else if (aNotification instanceof RelationNotification) {
            RelationNotification rn = (RelationNotification) aNotification;
            jaxb = mObjectFactory.createRelationNotification()
                    .withObjectName(String.valueOf(rn.getObjectName()))
                    .withRelationId(rn.getRelationId())
                    .withRelationTypeName(rn.getRelationTypeName())
                    .withRoleName(rn.getRoleName());
            if (rn.getNewRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getNewRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withNewRoleValue(ont);
            }
            if (rn.getOldRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getOldRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withOldRoleValue(ont);
            }
            if (rn.getMBeansToUnregister() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getMBeansToUnregister());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withMBeansToUnregister(ont);
            }
        } else if (aNotification instanceof TimerNotification) {
            jaxb = mObjectFactory.createTimerNotification().withNotificationId(((TimerNotification) aNotification).getNotificationID());
        } else {
View Full Code Here

Examples of javax.management.relation.RelationNotification

   public void compareRelationNotification(Object o1, Object o2)
   {
      compareNotification(o1, o2);

      RelationNotification n1 = (RelationNotification)o1;
      RelationNotification n2 = (RelationNotification)o2;

      if (!n1.getMBeansToUnregister().equals(n2.getMBeansToUnregister())) throw new RuntimeException();
      List news1 = n1.getNewRoleValue();
      List news2 = n2.getNewRoleValue();
      if (news1.size() != news2.size()) throw new RuntimeException();
      if (!n1.getObjectName().equals(n2.getObjectName())) throw new RuntimeException();
      List olds1 = n1.getOldRoleValue();
      List olds2 = n2.getOldRoleValue();
      if (olds1.size() != olds2.size()) throw new RuntimeException();
      if (!n1.getRelationId().equals(n2.getRelationId())) throw new RuntimeException();
      if (!n1.getRelationTypeName().equals(n2.getRelationTypeName())) throw new RuntimeException();
      if (!n1.getRoleName().equals(n2.getRoleName())) throw new RuntimeException();
   }
View Full Code Here

Examples of javax.management.relation.RelationNotification

                    .withDerivedGauge(String.valueOf(mn.getDerivedGauge()))
                    .withObservedAttribute(mn.getObservedAttribute())
                    .withObservedObject(String.valueOf(mn.getObservedObject()))
                    .withTrigger(String.valueOf(mn.getTrigger()));
        } else if (aNotification instanceof RelationNotification) {
            RelationNotification rn = (RelationNotification) aNotification;
            jaxb = mObjectFactory.createRelationNotification()
                    .withObjectName(String.valueOf(rn.getObjectName()))
                    .withRelationId(rn.getRelationId())
                    .withRelationTypeName(rn.getRelationTypeName())
                    .withRoleName(rn.getRoleName());
            if (rn.getNewRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getNewRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withNewRoleValue(ont);
            }
            if (rn.getOldRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getOldRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withOldRoleValue(ont);
            }
            if (rn.getMBeansToUnregister() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getMBeansToUnregister());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withMBeansToUnregister(ont);
            }
        } else if (aNotification instanceof TimerNotification) {
            jaxb = mObjectFactory.createTimerNotification().withNotificationId(((TimerNotification) aNotification).getNotificationID());
        } else {
View Full Code Here

Examples of javax.management.relation.RelationNotification

    public void triggerRelationNotification() throws Exception {
        List<ObjectName> list = new ArrayList<ObjectName>();
        for (int i = 1; i <= 3; i++) {
            list.add(new ObjectName("TestDomain", "name", "mbean-" + i));
        }
        RelationNotification n = new RelationNotification(RelationNotification.RELATION_BASIC_CREATION,
                new ObjectName("TestDomain", "name", "source"), mSequence++, mTimestamp,
                "relation message",
                "relation-id",
                "relation.type",
                new ObjectName("TestDomain", "name", "foo"),
View Full Code Here

Examples of javax.management.relation.RelationNotification

                    .withDerivedGauge(String.valueOf(mn.getDerivedGauge()))
                    .withObservedAttribute(mn.getObservedAttribute())
                    .withObservedObject(String.valueOf(mn.getObservedObject()))
                    .withTrigger(String.valueOf(mn.getTrigger()));
        } else if (aNotification instanceof RelationNotification) {
            RelationNotification rn = (RelationNotification) aNotification;
            jaxb = mObjectFactory.createRelationNotification()
                    .withObjectName(String.valueOf(rn.getObjectName()))
                    .withRelationId(rn.getRelationId())
                    .withRelationTypeName(rn.getRelationTypeName())
                    .withRoleName(rn.getRoleName());
            if (rn.getNewRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getNewRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withNewRoleValue(ont);
            }
            if (rn.getOldRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getOldRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withOldRoleValue(ont);
            }
            if (rn.getMBeansToUnregister() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getMBeansToUnregister());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withMBeansToUnregister(ont);
            }
        } else if (aNotification instanceof TimerNotification) {
            jaxb = mObjectFactory.createTimerNotification().withNotificationId(((TimerNotification) aNotification).getNotificationID());
        } else {
View Full Code Here

Examples of javax.management.relation.RelationNotification

                    .withDerivedGauge(String.valueOf(mn.getDerivedGauge()))
                    .withObservedAttribute(mn.getObservedAttribute())
                    .withObservedObject(String.valueOf(mn.getObservedObject()))
                    .withTrigger(String.valueOf(mn.getTrigger()));
        } else if (aNotification instanceof RelationNotification) {
            RelationNotification rn = (RelationNotification) aNotification;
            jaxb = mObjectFactory.createRelationNotification()
                    .withObjectName(String.valueOf(rn.getObjectName()))
                    .withRelationId(rn.getRelationId())
                    .withRelationTypeName(rn.getRelationTypeName())
                    .withRoleName(rn.getRoleName());
            if (rn.getNewRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getNewRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withNewRoleValue(ont);
            }
            if (rn.getOldRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getOldRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withOldRoleValue(ont);
            }
            if (rn.getMBeansToUnregister() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getMBeansToUnregister());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withMBeansToUnregister(ont);
            }
        } else if (aNotification instanceof TimerNotification) {
            jaxb = mObjectFactory.createTimerNotification().withNotificationId(((TimerNotification) aNotification).getNotificationID());
        } else {
View Full Code Here

Examples of javax.management.relation.RelationNotification

    public void triggerRelationNotification() throws Exception {
        List<ObjectName> list = new ArrayList<ObjectName>();
        for (int i = 1; i <= 3; i++) {
            list.add(new ObjectName("TestDomain", "name", "mbean-" + i));
        }
        RelationNotification n = new RelationNotification(RelationNotification.RELATION_BASIC_CREATION,
                new ObjectName("TestDomain", "name", "source"), mSequence++, mTimestamp,
                "relation message",
                "relation-id",
                "relation.type",
                new ObjectName("TestDomain", "name", "foo"),
View Full Code Here

Examples of javax.management.relation.RelationNotification

                    .withDerivedGauge(String.valueOf(mn.getDerivedGauge()))
                    .withObservedAttribute(mn.getObservedAttribute())
                    .withObservedObject(String.valueOf(mn.getObservedObject()))
                    .withTrigger(String.valueOf(mn.getTrigger()));
        } else if (aNotification instanceof RelationNotification) {
            RelationNotification rn = (RelationNotification) aNotification;
            jaxb = mObjectFactory.createRelationNotification()
                    .withObjectName(String.valueOf(rn.getObjectName()))
                    .withRelationId(rn.getRelationId())
                    .withRelationTypeName(rn.getRelationTypeName())
                    .withRoleName(rn.getRoleName());
            if (rn.getNewRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getNewRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withNewRoleValue(ont);
            }
            if (rn.getOldRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getOldRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withOldRoleValue(ont);
            }
            if (rn.getMBeansToUnregister() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getMBeansToUnregister());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withMBeansToUnregister(ont);
            }
        } else if (aNotification instanceof TimerNotification) {
            jaxb = mObjectFactory.createTimerNotification().withNotificationId(((TimerNotification) aNotification).getNotificationID());
        } else {
View Full Code Here

Examples of javax.management.relation.RelationNotification

                    .withDerivedGauge(String.valueOf(mn.getDerivedGauge()))
                    .withObservedAttribute(mn.getObservedAttribute())
                    .withObservedObject(String.valueOf(mn.getObservedObject()))
                    .withTrigger(String.valueOf(mn.getTrigger()));
        } else if (aNotification instanceof RelationNotification) {
            RelationNotification rn = (RelationNotification) aNotification;
            jaxb = mObjectFactory.createRelationNotification()
                    .withObjectName(String.valueOf(rn.getObjectName()))
                    .withRelationId(rn.getRelationId())
                    .withRelationTypeName(rn.getRelationTypeName())
                    .withRoleName(rn.getRoleName());
            if (rn.getNewRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getNewRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withNewRoleValue(ont);
            }
            if (rn.getOldRoleValue() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getOldRoleValue());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withOldRoleValue(ont);
            }
            if (rn.getMBeansToUnregister() != null) {
                ObjectNamesType ont = toObjectNamesType(rn.getMBeansToUnregister());
                ((org.apache.camel.component.jmx.jaxb.RelationNotification) jaxb).withMBeansToUnregister(ont);
            }
        } else if (aNotification instanceof TimerNotification) {
            jaxb = mObjectFactory.createTimerNotification().withNotificationId(((TimerNotification) aNotification).getNotificationID());
        } else {
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.