Coverage Report - org.mule.module.management.mbean.MuleConfigurationService
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleConfigurationService
0%
0/16
N/A
1
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.module.management.mbean;
 8  
 
 9  
 import org.mule.api.config.MuleConfiguration;
 10  
 import org.mule.config.DefaultMuleConfiguration;
 11  
 import org.mule.util.StringUtils;
 12  
 
 13  
 /**
 14  
  * <code>MuleConfigurationService</code> exposes the MuleConfiguration settings as
 15  
  * a management service.
 16  
  * 
 17  
  */
 18  
 public class MuleConfigurationService implements MuleConfigurationServiceMBean
 19  
 {
 20  
     private  MuleConfiguration muleConfiguration;
 21  
 
 22  
     public MuleConfigurationService(MuleConfiguration muleConfiguration)
 23  0
     {
 24  0
         this.muleConfiguration = muleConfiguration;
 25  0
     }
 26  
 
 27  
     public int getSynchronousEventTimeout()
 28  
     {
 29  0
         return muleConfiguration.getDefaultResponseTimeout();
 30  
     }
 31  
 
 32  
     public String getWorkingDirectory()
 33  
     {
 34  0
         return muleConfiguration.getWorkingDirectory();
 35  
     }
 36  
 
 37  
     public int getTransactionTimeout()
 38  
     {
 39  0
         return muleConfiguration.getDefaultTransactionTimeout();
 40  
     }
 41  
 
 42  
     public int getShutdownTimeout()
 43  
     {
 44  0
         return muleConfiguration.getShutdownTimeout();
 45  
     }
 46  
 
 47  
     public boolean isClientMode()
 48  
     {
 49  0
         return muleConfiguration.isClientMode();
 50  
     }
 51  
 
 52  
 
 53  
     public String getEncoding()
 54  
     {
 55  0
         return muleConfiguration.getDefaultEncoding();
 56  
     }
 57  
 
 58  
     public boolean isContainerMode()
 59  
     {
 60  0
         return muleConfiguration.isContainerMode();
 61  
     }
 62  
 
 63  
     public boolean isFullStackTraces()
 64  
     {
 65  
         /*
 66  
             Sacrifice the code quality for the sake of keeping things simple -
 67  
             the alternative would be to pass MuleContext into every exception constructor.
 68  
          */
 69  0
         return DefaultMuleConfiguration.fullStackTraces;
 70  
     }
 71  
 
 72  
     public void setFullStackTraces(boolean flag)
 73  
     {
 74  
         /*
 75  
            Sacrifice the code quality for the sake of keeping things simple -
 76  
            the alternative would be to pass MuleContext into every exception constructor.
 77  
         */
 78  0
         DefaultMuleConfiguration.fullStackTraces = flag;
 79  0
     }
 80  
 
 81  
     public String getStackTraceFilter()
 82  
     {
 83  0
         return StringUtils.join(DefaultMuleConfiguration.stackTraceFilter, ',');
 84  
     }
 85  
 
 86  
     public void setStackTraceFilter(String filterAsString)
 87  
     {
 88  0
         DefaultMuleConfiguration.stackTraceFilter = filterAsString.split(",");
 89  0
     }
 90  
 }