Package org.jboss.varia.scheduler.example

Examples of org.jboss.varia.scheduler.example.SchedulableMBeanExampleMBean


    assertTrue(on + " isRegistered", getServer().isRegistered(on));
   }

   private SchedulableMBeanExampleMBean get(ObjectName on) throws Exception
   {
    SchedulableMBeanExampleMBean ex = (SchedulableMBeanExampleMBean)
     MBeanServerInvocationHandler.newProxyInstance(getServer(), on,
         SchedulableMBeanExampleMBean.class, false);
    return ex;
   }
View Full Code Here


    return ex;
   }

   private void check(ObjectName on, int hits, long remaining) throws Exception
   {
    SchedulableMBeanExampleMBean ex = get(on);
    assertNotNull("name " + on, ex);

    assertEquals("hits", hits, ex.getHitCount());

    Date hd = ex.getHitDate();
    if (hits > 0)
    {
     Date now = new Date();
     assertNotNull("hit date", hd);
     assertTrue("date " + hd + " " + now, !hd.after(now));
     assertTrue("note", ex.getHitNotification() != null);
     assertTrue("sched", ex.getSchedulerName() != null);
     assertEquals("remaining", remaining, ex.getRemainingRepetitions());
    }
    assertEquals(null, ex.getTestString());
   }
View Full Code Here

    assertTrue(on + " isRegistered", getServer().isRegistered(on));
   }

   private SchedulableMBeanExampleMBean get(ObjectName on) throws Exception
   {
    SchedulableMBeanExampleMBean ex = (SchedulableMBeanExampleMBean)
     MBeanServerInvocationHandler.newProxyInstance(getServer(), on,
         SchedulableMBeanExampleMBean.class, false);
    return ex;
   }
View Full Code Here

    return ex;
   }

   private void check(ObjectName on, int hits, long remaining) throws Exception
   {
    SchedulableMBeanExampleMBean ex = get(on);
    assertNotNull("name " + on, ex);

    assertEquals("hits", hits, ex.getHitCount());

    Date hd = ex.getHitDate();
    if (hits > 0)
    {
     Date now = new Date();
     assertNotNull("hit date", hd);
     assertTrue("date " + hd + " " + now, !hd.after(now));
     assertTrue("note", ex.getHitNotification() != null);
     assertTrue("sched", ex.getSchedulerName() != null);
     assertEquals("remaining", remaining, ex.getRemainingRepetitions());
    }
    assertEquals(null, ex.getTestString());
   }
View Full Code Here

    assertTrue(on + " isRegistered", getServer().isRegistered(on));
   }

   private SchedulableMBeanExampleMBean get(ObjectName on) throws Exception
   {
    SchedulableMBeanExampleMBean ex = (SchedulableMBeanExampleMBean)
     MBeanServerInvocationHandler.newProxyInstance(getServer(), on,
         SchedulableMBeanExampleMBean.class, false);
    return ex;
   }
View Full Code Here

    return ex;
   }

   private void check(ObjectName on, int hits, long remaining) throws Exception
   {
    SchedulableMBeanExampleMBean ex = get(on);
    assertNotNull("name " + on, ex);

    assertEquals("hits", hits, ex.getHitCount());

    Date hd = ex.getHitDate();
    if (hits > 0)
    {
     Date now = new Date();
     assertNotNull("hit date", hd);
     assertTrue("date " + hd + " " + now, !hd.after(now));
     assertTrue("note", ex.getHitNotification() != null);
     assertTrue("sched", ex.getSchedulerName() != null);
     assertEquals("remaining", remaining, ex.getRemainingRepetitions());
    }
    assertEquals(null, ex.getTestString());
   }
View Full Code Here

TOP

Related Classes of org.jboss.varia.scheduler.example.SchedulableMBeanExampleMBean

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.