org.mule.api.context
Interface MuleContextFactory

All Known Implementing Classes:
DefaultMuleContextFactory

public interface MuleContextFactory

A MuleContextFactory is used to create instances of MuleContext. The instances of MuleContext returned by this factory are initialised but not started.


Method Summary
 void addListener(MuleContextListener listener)
          Adds a listener to be notified of each event related to the creation of a new MuleContext
 MuleContext createMuleContext()
          Returns an existing instance of MuleContext is one exists, otherwise a new MuleContext instance is created with defaults.
 MuleContext createMuleContext(ConfigurationBuilder configurationBuilder)
          Creates a new MuleContext using the given configurationBuilder
 MuleContext createMuleContext(ConfigurationBuilder configurationBuilder, MuleContextBuilder muleContextBuilder)
          Creates a new MuleContext using the MuleContextBuilder provided and configures it with the list of configuration builder and c onfigures it with configurationBuilder
 MuleContext createMuleContext(List<ConfigurationBuilder> configurationBuilders, MuleContextBuilder muleContextBuilder)
          Creates a new MuleContext using the MuleContextBuilder provided and configures it with the list of configuration builders.
 MuleContext createMuleContext(MuleContextBuilder muleContextBuilder)
          Creates a new MuleContext using the MuleContextBuilder provided.
 boolean removeListener(MuleContextListener listener)
          Removes a listener from the factory.
 

Method Detail

createMuleContext

MuleContext createMuleContext()
                              throws InitialisationException,
                                     ConfigurationException
Returns an existing instance of MuleContext is one exists, otherwise a new MuleContext instance is created with defaults.

Throws:
InitialisationException
ConfigurationException
See Also:
DefaultsConfigurationBuilder

createMuleContext

MuleContext createMuleContext(MuleContextBuilder muleContextBuilder)
                              throws InitialisationException,
                                     ConfigurationException
Creates a new MuleContext using the MuleContextBuilder provided.

Throws:
InitialisationException
ConfigurationException

createMuleContext

MuleContext createMuleContext(ConfigurationBuilder configurationBuilder)
                              throws InitialisationException,
                                     ConfigurationException
Creates a new MuleContext using the given configurationBuilder

Parameters:
configurationBuilder -
Throws:
InitialisationException
ConfigurationException

createMuleContext

MuleContext createMuleContext(ConfigurationBuilder configurationBuilder,
                              MuleContextBuilder muleContextBuilder)
                              throws InitialisationException,
                                     ConfigurationException
Creates a new MuleContext using the MuleContextBuilder provided and configures it with the list of configuration builder and c onfigures it with configurationBuilder

Parameters:
configurationBuilder -
Throws:
InitialisationException
ConfigurationException

createMuleContext

MuleContext createMuleContext(List<ConfigurationBuilder> configurationBuilders,
                              MuleContextBuilder muleContextBuilder)
                              throws InitialisationException,
                                     ConfigurationException
Creates a new MuleContext using the MuleContextBuilder provided and configures it with the list of configuration builders. Configuration builders will be invoked in the same or as provided in the List.

Throws:
InitialisationException
ConfigurationException

addListener

void addListener(MuleContextListener listener)
Adds a listener to be notified of each event related to the creation of a new MuleContext

Parameters:
listener - listener to add. Must be non null.

removeListener

boolean removeListener(MuleContextListener listener)
Removes a listener from the factory.

Parameters:
listener - the listener to remove. After this call, the listener won't receive any notifications from this factory.
Returns:
true if the listener was registered in the factory, false otherwise


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.