Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ConfigurationBuilder |
|
| 1.0;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.api.config; | |
8 | ||
9 | import org.mule.api.MuleContext; | |
10 | ||
11 | /** | |
12 | * A <code>ConfigurationBuilder</code> is used to configure a Mule instance, | |
13 | * represented by a MuleContext instance. Multiple ConfigurationBuilder's can be used | |
14 | * to configure a single mule instance with each ConfigurationBuilder doing one of | |
15 | * more of the following: | |
16 | * <li> Creation of mule runtime artifacts (endpoint's, connector's, service's, | |
17 | * transformer's) which are then registered with the <code>Registy</code | |
18 | * <li> Creation and registration of SecurityManager / TransactionManager / TransactionManagerFactory / QueueManager | |
19 | * and ThreadingProfile's. Unlike the runtime artifacts mule only uses a single instance of each of these and so if | |
20 | * multiple configuration builder create and register these artifacts only one will be used. | |
21 | * <li> Configuration of existing Mule configuration related artifacts such as <code>MuleConfiguration</code> and | |
22 | * <code>ServerNotificationManager</code> | |
23 | * <br/><br/> | |
24 | * Which of the above takes place, depends on what the configuration source contains and the ConfgurationBuilder implementation is used. | |
25 | */ | |
26 | public interface ConfigurationBuilder | |
27 | { | |
28 | ||
29 | /** | |
30 | * Will configure a MuleContext based on the configuration provided. The configuration will be set on the | |
31 | * {@link org.mule.api.config.ConfigurationBuilder} implementation as bean properties before this method | |
32 | * has been called. | |
33 | * | |
34 | * @param muleContext The current {@link org.mule.api.MuleContext} | |
35 | * @throws ConfigurationException if the configuration fails i.e. an object cannot be created or | |
36 | * initialised properly | |
37 | */ | |
38 | void configure(MuleContext muleContext) throws ConfigurationException; | |
39 | ||
40 | /** | |
41 | * Indicate whether this ConfigurationBulder has been configured yet | |
42 | * | |
43 | * @return <code>true</code> if this ConfigurationBulder has been configured. | |
44 | */ | |
45 | boolean isConfigured(); | |
46 | } |