Examples of RelationSupport


Examples of javax.management.relation.RelationSupport

      {
         ObjectName service = createRelationService("test:type=service", server);
         createRelationTypeC(service);
         createRolesC(server);
         createRolesCX(server);
         RelationSupport support = null;
         Listener listener = new Listener(RelationNotification.RELATION_MBEAN_UPDATE);
         RoleList shouldBe = new RoleList();
         shouldBe.add(roleC1);
         shouldBe.add(roleCX2);
         try
         {
            support = new RelationSupport("id1", service, server,
                                          "relationTypeC", rolesC);
            addRelation(server, service, support, "test:type=support1");
            server.addNotificationListener(service, listener, null, null);
           
            support.setRoles(shouldBe);
         }
         catch(Exception e)
         {
            fail(e.toString());
         }
         compare(shouldBe, support.retrieveAllRoles());
         listener.check(1);
      }
      finally
      {
         MBeanServerFactory.releaseMBeanServer(server);
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.