01: /*
02: * $Id: ConfigurationBuilder.java 10489 2008-01-23 17:53:38Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.api.config;
12:
13: import org.mule.api.MuleContext;
14:
15: /**
16: * A <code>ConfigurationBuilder</code> is used to configure a Mule instance,
17: * represented by a MuleContext instance. Multiple ConfigurationBuilder's can be used
18: * to configure a single mule instance with each ConfigurationBuilder doing one of
19: * more of the following:
20: * <li> Creation of mule runtime artifacts (endpoint's, connector's, service's,
21: * transformer's) which are then registered with the <code>Registy</code
22: * <li> Creation and registration of SecurityManager / TransactionManager / TransactionManagerFactory / QueueManager
23: * and ThreadingProfile's. Unlike the runtime artifacts mule only uses a single instance of each of these and so if
24: * multiple configuration builder create and register these artifacts only one will be used.
25: * <li> Configuration of existing Mule configuration related artifacts such as <code>MuleConfiguration</code> and
26: * <code>ServerNotificationManager</code>
27: * <br/><br/>
28: * Which of the above takes place, depends on what the configuration source contains and the ConfgurationBuilder implementation is used.
29: */
30: public interface ConfigurationBuilder {
31:
32: /**
33: * Will configure a MuleContext based on the configuration provided
34: *
35: * @param muleContext
36: * @throws ConfigurationException
37: */
38: void configure(MuleContext muleContext)
39: throws ConfigurationException;
40:
41: /**
42: * Indicate whether this ConfigurationBulder has been configured yet
43: *
44: * @return <code>true</code> if this ConfigurationBulder has been configured.
45: */
46: boolean isConfigured();
47: }
|