Examples of Trivial


Examples of test.compliance.relation.support.Trivial

            fail("addRelation allowed when not registered");

         ObjectName badRelation = null;
         server.registerMBean(rs, service);
         badRelation = new ObjectName("test:type=bad");
         server.registerMBean(new Trivial(), badRelation);

         caught = false;
         try
         {
            rs.addRelation(badRelation);
View Full Code Here

Examples of test.compliance.standard.support.Trivial

   public void testDontSpecifyManagementInterface()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      ObjectName name = new ObjectName("test:test=test");
      server.registerMBean(new StandardMBean(new Trivial(), null), name);
      server.invoke(name, "doOperation", new Object[] { "arg" }, new String[] { String.class.getName() });
   }
View Full Code Here

Examples of test.compliance.standard.support.Trivial

   }

   public void testMBeanInterfaceOldStyle()
      throws Exception
   {
      Object obj = new Trivial();
      StandardMBean std = new StandardMBean(obj, null);
      assertTrue("Trivial has TrivialMBean as a management interface", TrivialMBean.class == std.getMBeanInterface());
   }
View Full Code Here

Examples of test.compliance.standard.support.Trivial

   }

   public void testRegistration()
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      Trivial trivial = new Trivial();

      ObjectName name = null;
      try
      {
         name = new ObjectName("trivial:key=val");
View Full Code Here

Examples of test.compliance.standard.support.Trivial

      MBeanInfo info = null;

      try
      {
         MBeanServer server = MBeanServerFactory.newMBeanServer();
         Trivial trivial = new Trivial();

         ObjectName name = new ObjectName("trivial:key=val");
         ObjectInstance instance = server.registerMBean(trivial, name);
         info = server.getMBeanInfo(name);
      }
View Full Code Here

Examples of test.implementation.modelmbean.support.Trivial

   }
  
   public void testCreateWithStandardInterface() throws Exception
   {
      MBeanServer server = MBeanServerFactory.createMBeanServer();
      Trivial trivial = new Trivial();
      ObjectName name = new ObjectName(":foo=bar");
     
      XMBean mmb = new XMBean(trivial, XMBeanConstants.STANDARD_INTERFACE);
      server.registerMBean(mmb, name);
     
View Full Code Here

Examples of test.implementation.registry.support.Trivial

         valuesMap.put(CLASSLOADER, Thread.currentThread().getContextClassLoader());
         ObjectName mbean = new ObjectName("test:test=test");
         server.invoke(new ObjectName(MBEAN_REGISTRY), "registerMBean",
            new Object[]
            {
               new Trivial(),
               mbean,
               valuesMap
            },
            new String[]
            {
View Full Code Here

Examples of test.implementation.registry.support.Trivial

         valuesMap.put("date", date);
         ObjectName mbean = new ObjectName("test:test=test");
         server.invoke(new ObjectName(MBEAN_REGISTRY), "registerMBean",
            new Object[]
            {
               new Trivial(),
               mbean,
               valuesMap
            },
            new String[]
            {
View Full Code Here

Examples of test.implementation.registry.support.Trivial

         valuesMap.put("date", date);
         ObjectName mbean = new ObjectName("test:test=test");
         server.invoke(new ObjectName(MBEAN_REGISTRY), "registerMBean",
            new Object[]
            {
               new Trivial(),
               mbean,
               valuesMap
            },
            new String[]
            {
               Object.class.getName(),
               ObjectName.class.getName(),
               Map.class.getName()
            }
         );
         Object result = server.invoke(new ObjectName(MBEAN_REGISTRY), "getValue",
            new Object[]
            {
               mbean,
               "date"
            },
            new String[]
            {
               ObjectName.class.getName(),
               String.class.getName()
            }
         );
         assertEquals(date, result);

         // Now remove it, reregister it and make sure it returns the new value
         server.unregisterMBean(mbean);

         Thread.currentThread().sleep(2);
         date = new Date(System.currentTimeMillis());
         HashMap valueMap2 = new HashMap();
         valueMap2.put("date", date);
         server.invoke(new ObjectName(MBEAN_REGISTRY), "registerMBean",
            new Object[]
            {
               new Trivial(),
               mbean,
               valueMap2
            },
            new String[]
            {
View Full Code Here

Examples of test.implementation.server.support.Trivial

      try
      {
         server = MBeanServerFactory.createMBeanServer();
         unqualifiedName = new ObjectName(":property=1");
         qualifiedName = new ObjectName("DefaultDomain:property=1");
         instance1 = server.registerMBean(new Trivial(), qualifiedName);
         instance2 = server.getObjectInstance(unqualifiedName);
      }
      catch (Exception e)
      {
         fail(e.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.