Coverage Report - org.mule.module.management.mbean.FlowConstructStats
 
Classes in this File Line Coverage Branch Coverage Complexity
FlowConstructStats
0%
0/22
N/A
1
 
 1  
 /*
 2  
  * $Id: FlowConstructStats.java 20320 2010-11-24 15:03:31Z dfeist $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 package org.mule.module.management.mbean;
 11  
 
 12  
 import org.apache.commons.logging.Log;
 13  
 import org.apache.commons.logging.LogFactory;
 14  
 import org.mule.management.stats.FlowConstructStatistics;
 15  
 
 16  
 import javax.management.MBeanRegistration;
 17  
 import javax.management.MBeanServer;
 18  
 import javax.management.ObjectName;
 19  
 
 20  
 /**
 21  
  * A concrete class that holds management information for a Mule managed flow.
 22  
  */
 23  
 public class FlowConstructStats implements FlowConstructStatsMBean, MBeanRegistration
 24  
 {
 25  
     private final FlowConstructStatistics statistics;
 26  
 
 27  
 
 28  
     protected MBeanServer server;
 29  
 
 30  
     protected ObjectName name;
 31  
 
 32  
     /**
 33  
      * logger used by this class
 34  
      */
 35  0
     private static Log LOGGER = LogFactory.getLog(FlowConstructStats.class);
 36  
 
 37  
     public FlowConstructStats(FlowConstructStatistics statistics)
 38  0
     {
 39  0
         this.statistics = statistics;
 40  0
     }
 41  
 
 42  
     public long getAverageProcessingTime()
 43  
     {
 44  0
         return statistics.getAverageProcessingTime();
 45  
     }
 46  
 
 47  
     public long getProcessedEvents()
 48  
     {
 49  0
         return statistics.getProcessedEvents();
 50  
     }
 51  
 
 52  
     public long getMaxProcessingTime()
 53  
     {
 54  0
         return statistics.getMaxProcessingTime();
 55  
     }
 56  
 
 57  
     public long getMinProcessingTime()
 58  
     {
 59  0
         return statistics.getMinProcessingTime();
 60  
     }
 61  
 
 62  
     public long getTotalProcessingTime()
 63  
     {
 64  0
         return statistics.getTotalProcessingTime();
 65  
     }
 66  
 
 67  
     public void clearStatistics()
 68  
     {
 69  0
         statistics.clear();
 70  0
     }
 71  
 
 72  
     public long getAsyncEventsReceived()
 73  
     {
 74  0
         return statistics.getAsyncEventsReceived();
 75  
     }
 76  
 
 77  
     public long getSyncEventsReceived()
 78  
     {
 79  0
         return statistics.getSyncEventsReceived();
 80  
     }
 81  
 
 82  
     public long getTotalEventsReceived()
 83  
     {
 84  0
         return statistics.getTotalEventsReceived();
 85  
     }
 86  
 
 87  
     public long getExecutionErrors()
 88  
     {
 89  0
         return statistics.getExecutionErrors();
 90  
     }
 91  
 
 92  
     public long getFatalErrors()
 93  
     {
 94  0
         return statistics.getFatalErrors();
 95  
     }
 96  
 
 97  
     public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
 98  
     {
 99  0
         this.server = server;
 100  0
         this.name = name;
 101  0
         return name;
 102  
     }
 103  
 
 104  
     public void postRegister(Boolean registrationDone)
 105  
     {
 106  
         // nothing to do
 107  0
     }
 108  
 
 109  
     public void preDeregister() throws Exception
 110  
     {
 111  
         // nothing to do
 112  0
     }
 113  
 
 114  
     public void postDeregister()
 115  
     {
 116  
         // nothing to do
 117  0
     }
 118  
 }