Package jfun.yan.monitoring

Examples of jfun.yan.monitoring.MonitoringContainer


    assertTrue(mon.isInvoking());
    assertTrue(mon.isInvoked());
    assertFalse(mon.isInvocationFailed());
  }
  private void testMonitor(BookmarkMonitor mon, ComponentMonitor m){
    final Container yan = new MonitoringContainer(m);
    yan.registerValue(arg0);
    yan.registerValue(arg1);
    yan.registerConstructor("target", MonitoredObject.class);
    try{
      yan.getInstance("target");
      fail("should have failed");
    }
    catch(ComponentInstantiationException e){     
    }
    assertTrue(mon.isConstructing());
    assertFalse(mon.isConstructed());
    assertTrue(mon.isConstructionFailed());
    assertFalse(mon.isInvoking());
    yan.registerComponent("target",
        new Monitors(m).static_method(MonitoredObject.class, "instance")
        .withArgument(2, Components.value(arg2)));
    yan.getInstance("target");
    assertTrue(mon.isInvoking());
    assertTrue(mon.isInvoked());
    assertFalse(mon.isInvocationFailed());
  }
View Full Code Here

TOP

Related Classes of jfun.yan.monitoring.MonitoringContainer

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.