Package net.anotheria.moskito.core.producers

Examples of net.anotheria.moskito.core.producers.CallExecution


    //doing something
    //... bla boo bla

    //here comes monitored part
    try{
      CallExecution execution = producer.getStats("methodWhichIsPartiallyMonitored").createCallExecution();
      execution.startExecution();
      //now we are doing something extremely important...
      execution.finishExecution();

    }catch(OnDemandStatsProducerException e){
      //react somehow, preferably smarter than the following line:
      throw new AssertionError("This should never happen in the example environment");
    }
View Full Code Here


    //doing something
    //... bla boo bla

    //here comes the beginning of our complex process
    try{
      CallExecution execution = producer.getStats("phase1").createCallExecution();
      execution.startExecution();
      //now we are doing something extremely important...
      execution.finishExecution();

      //now we are doing phase 2. For whatever reasons we have to do it in a loop or something.
      for (int i=0; i<3; i++){
        execution = producer.getStats("phase2").createCallExecution();
        execution.startExecution();
        //now we are doing something extremely important...
        execution.finishExecution();
      }
      //no we do something else, until we finally have to do the last phase twice...

      execution = producer.getStats("phase3").createCallExecution();
      execution.startExecution();
      //now we are doing something extremely important...
      execution.finishExecution();
      execution = producer.getStats("phase3").createCallExecution();
      execution.startExecution();
      //now we are doing something extremely important...
      execution.finishExecution();

      //now we are all set


    }catch(OnDemandStatsProducerException e){
View Full Code Here

TOP

Related Classes of net.anotheria.moskito.core.producers.CallExecution

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.