View Javadoc
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.api.config;
8   
9   /**
10   * Configuration info. which can be set when creating the MuleContext but becomes
11   * immutable after startup.
12   */
13  public interface MuleConfiguration
14  {
15      int getDefaultResponseTimeout();
16  
17      String getWorkingDirectory();
18  
19      String getMuleHomeDirectory();
20  
21      int getDefaultTransactionTimeout();
22  
23      boolean isClientMode();
24  
25      String getDefaultEncoding();
26  
27      String getId();
28  
29      String getClusterId();
30  
31      String getDomainId();
32  
33      String getSystemModelType();
34  
35      String getSystemName();
36  
37      boolean isAutoWrapMessageAwareTransform();
38  
39      boolean isCacheMessageAsBytes();
40  
41      boolean isCacheMessageOriginalPayload();
42  
43      boolean isEnableStreaming();
44  
45      boolean isValidateExpressions();
46  
47      int getDefaultQueueTimeout();
48      
49      int getShutdownTimeout();
50  
51      /**
52       * A container mode implies multiple Mule apps running. When true, Mule changes behavior in some areas, e.g.:
53       * <ul>
54       *     <li>Splash screens</li>
55       *     <li>Thread names have app name in the prefix to guarantee uniqueness</li>
56       * </ul>
57       * etc.
58       *
59       * Note that e.g. a WAR-embedded Mule will run in container mode, but will still be considerd embedded
60       * for management purposes.
61       *
62       * @see #isStandalone()
63       */
64      boolean isContainerMode();
65  
66      /**
67       * Try to guess if we're embedded. If "mule.home" JVM property has been set, then we've been
68       * started via Mule script and can assume we're running standalone. Otherwise (no property set), Mule
69       * has been started via a different mechanism.
70       * <p/>
71       * A standalone Mule is always considered running in 'container' mode.
72       *
73       * @see #isContainerMode()
74       */
75      boolean isStandalone();
76  }