View Javadoc

1   /*
2    * $Id: MuleContextBuilder.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.api.context;
12  
13  import org.mule.api.MuleContext;
14  import org.mule.api.config.MuleConfiguration;
15  import org.mule.api.lifecycle.LifecycleManager;
16  import org.mule.context.notification.ServerNotificationManager;
17  
18  import javax.resource.spi.work.WorkListener;
19  
20  /**
21   * Builder that is used to build instances of {@link MuleContext}. Implementing
22   * classes are stateful and should provide public chainable setters for configuring
23   * the builder instance and no public getters.
24   */
25  public interface MuleContextBuilder
26  {
27      /**
28       * Builds a new {@link MuleContext} instance using configured builder instance.
29       * Does not initialise or start MuleContext, only constructs the instance.
30       */
31      MuleContext buildMuleContext();
32  
33      void setWorkManager(WorkManager workManager);
34  
35      void setWorkListener(WorkListener workListener);
36      
37      void setNotificationManager(ServerNotificationManager notificationManager);
38  
39      void setLifecycleManager(LifecycleManager lifecycleManager);
40      
41      void setMuleConfiguration(MuleConfiguration muleConfiguration);
42  }