Package org.jboss.test.jmx.compliance.standard.support

Examples of org.jboss.test.jmx.compliance.standard.support.MyRunnable


   public void testSpecifyManagementInterface()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      ObjectName name = new ObjectName("test:test=test");
      server.registerMBean(new StandardMBean(new MyRunnable(), Runnable.class), name);
      server.invoke(name, "run", new Object[0], new String[0]);
   }
View Full Code Here


   }

   public void testGetImplementationSpecified()
      throws Exception
   {
      Runnable obj = new MyRunnable();
      StandardMBean std = new StandardMBean(obj, Runnable.class);
      assertTrue("MyRunnable is the implementation", obj == std.getImplementation());
      assertTrue("MyRunnable is the implementation class", obj.getClass() == std.getImplementationClass());
   }
View Full Code Here

   }

   public void testMBeanInterfaceSpecified()
      throws Exception
   {
      Runnable obj = new MyRunnable();
      StandardMBean std = new StandardMBean(obj, Runnable.class);
      assertTrue("MyRunnable has Runnable as a management interface", Runnable.class == std.getMBeanInterface());
   }
View Full Code Here

      assertTrue("Expected IllegalArgumentException for null implementation", caught);

      caught = false;
      try
      {
         new StandardMBean(new MyRunnable(), null);
      }
      catch (NotCompliantMBeanException e)
      {
         caught = true;
      }
View Full Code Here

TOP

Related Classes of org.jboss.test.jmx.compliance.standard.support.MyRunnable

Copyright © 2018 www.massapicom. 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.