View Javadoc

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