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  
  * $Id: MuleConfigurationService.java 19191 2010-08-25 21:05:23Z tcarlson $
 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  
 
 11  
 package org.mule.module.management.mbean;
 12  
 
 13  
 import org.mule.api.config.MuleConfiguration;
 14  
 import org.mule.config.DefaultMuleConfiguration;
 15  
 import org.mule.util.StringUtils;
 16  
 
 17  
 /**
 18  
  * <code>MuleConfigurationService</code> exposes the MuleConfiguration settings as
 19  
  * a management service.
 20  
  * 
 21  
  */
 22  
 public class MuleConfigurationService implements MuleConfigurationServiceMBean
 23  
 {
 24  
     private  MuleConfiguration muleConfiguration;
 25  
 
 26  
     public MuleConfigurationService(MuleConfiguration muleConfiguration)
 27  0
     {
 28  0
         this.muleConfiguration = muleConfiguration;
 29  0
     }
 30  
 
 31  
     public int getSynchronousEventTimeout()
 32  
     {
 33  0
         return muleConfiguration.getDefaultResponseTimeout();
 34  
     }
 35  
 
 36  
     public String getWorkingDirectory()
 37  
     {
 38  0
         return muleConfiguration.getWorkingDirectory();
 39  
     }
 40  
 
 41  
     public int getTransactionTimeout()
 42  
     {
 43  0
         return muleConfiguration.getDefaultTransactionTimeout();
 44  
     }
 45  
 
 46  
     public int getShutdownTimeout()
 47  
     {
 48  0
         return muleConfiguration.getShutdownTimeout();
 49  
     }
 50  
 
 51  
     public boolean isClientMode()
 52  
     {
 53  0
         return muleConfiguration.isClientMode();
 54  
     }
 55  
 
 56  
 
 57  
     public String getEncoding()
 58  
     {
 59  0
         return muleConfiguration.getDefaultEncoding();
 60  
     }
 61  
 
 62  
     public boolean isContainerMode()
 63  
     {
 64  0
         return muleConfiguration.isContainerMode();
 65  
     }
 66  
 
 67  
     public boolean isFullStackTraces()
 68  
     {
 69  
         /*
 70  
             Sacrifice the code quality for the sake of keeping things simple -
 71  
             the alternative would be to pass MuleContext into every exception constructor.
 72  
          */
 73  0
         return DefaultMuleConfiguration.fullStackTraces;
 74  
     }
 75  
 
 76  
     public void setFullStackTraces(boolean flag)
 77  
     {
 78  
         /*
 79  
            Sacrifice the code quality for the sake of keeping things simple -
 80  
            the alternative would be to pass MuleContext into every exception constructor.
 81  
         */
 82  0
         DefaultMuleConfiguration.fullStackTraces = flag;
 83  0
     }
 84  
 
 85  
     public String getStackTraceFilter()
 86  
     {
 87  0
         return StringUtils.join(DefaultMuleConfiguration.stackTraceFilter, ',');
 88  
     }
 89  
 
 90  
     public void setStackTraceFilter(String filterAsString)
 91  
     {
 92  0
         DefaultMuleConfiguration.stackTraceFilter = filterAsString.split(",");
 93  0
     }
 94  
 }