org.mule.module.guice
Class GuiceConfigurationBuilder

java.lang.Object
  extended by org.mule.config.builders.AbstractConfigurationBuilder
      extended by org.mule.module.guice.GuiceConfigurationBuilder
All Implemented Interfaces:
ConfigurationBuilder

public class GuiceConfigurationBuilder
extends AbstractConfigurationBuilder

Provides the configuration entry point for loading Guice modules into Mule. Users can pass in an array of Module into this builder or provide a base search path that Mule will use to search the classpath for any modules that implement Module. The basepath is a path on the classpath. Note for better performance, any basepath set should be qualified to your application. For example, if your application has a package com.mycompany.app, its better to set the base path to 'com/mycompany/app' over 'com/' or '/' since they will search everything on the classpath that matches the specified package.


Field Summary
protected  String basepath
           
protected  ClassLoader classLoader
           
static String DEFAULT_PACKAGE
           
protected  com.google.inject.Module[] modules
           
protected  com.google.inject.Stage stage
           
 
Fields inherited from class org.mule.config.builders.AbstractConfigurationBuilder
configured, logger
 
Constructor Summary
GuiceConfigurationBuilder()
           
GuiceConfigurationBuilder(ClassLoader classLoader)
           
GuiceConfigurationBuilder(com.google.inject.Module... modules)
           
GuiceConfigurationBuilder(com.google.inject.Stage stage, com.google.inject.Module... modules)
           
GuiceConfigurationBuilder(String basepath)
           
GuiceConfigurationBuilder(String basepath, ClassLoader classLoader)
           
 
Method Summary
protected  void doConfigure(MuleContext muleContext)
          Will configure a MuleContext based on the configuration provided.
protected  List<com.google.inject.Module> getSystemModules(MuleContext muleContext)
           
 
Methods inherited from class org.mule.config.builders.AbstractConfigurationBuilder
applyLifecycle, configure, isConfigured
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PACKAGE

public static final String DEFAULT_PACKAGE
See Also:
Constant Field Values

basepath

protected String basepath

modules

protected com.google.inject.Module[] modules

stage

protected com.google.inject.Stage stage

classLoader

protected ClassLoader classLoader
Constructor Detail

GuiceConfigurationBuilder

public GuiceConfigurationBuilder()

GuiceConfigurationBuilder

public GuiceConfigurationBuilder(ClassLoader classLoader)

GuiceConfigurationBuilder

public GuiceConfigurationBuilder(String basepath)

GuiceConfigurationBuilder

public GuiceConfigurationBuilder(String basepath,
                                 ClassLoader classLoader)

GuiceConfigurationBuilder

public GuiceConfigurationBuilder(com.google.inject.Module... modules)

GuiceConfigurationBuilder

public GuiceConfigurationBuilder(com.google.inject.Stage stage,
                                 com.google.inject.Module... modules)
Method Detail

doConfigure

protected void doConfigure(MuleContext muleContext)
                    throws Exception
Description copied from class: AbstractConfigurationBuilder
Will configure a MuleContext based on the configuration provided. The configuration will be set on the ConfigurationBuilder implementation as bean properties before this method has been called.

Specified by:
doConfigure in class AbstractConfigurationBuilder
Parameters:
muleContext - The current MuleContext
Throws:
ConfigurationException - if the configuration fails i.e. an object cannot be created or initialised properly
Exception

getSystemModules

protected List<com.google.inject.Module> getSystemModules(MuleContext muleContext)


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