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  java.lang.String basepath
           
protected  java.lang.ClassLoader classLoader
           
static java.lang.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(java.lang.ClassLoader classLoader)
           
GuiceConfigurationBuilder(com.google.inject.Module... modules)
           
GuiceConfigurationBuilder(com.google.inject.Stage stage, com.google.inject.Module... modules)
           
GuiceConfigurationBuilder(java.lang.String basepath)
           
GuiceConfigurationBuilder(java.lang.String basepath, java.lang.ClassLoader classLoader)
           
 
Method Summary
protected  void doConfigure(MuleContext muleContext)
          Will configure a MuleContext based on the configuration provided.
protected  java.util.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 java.lang.String DEFAULT_PACKAGE
See Also:
Constant Field Values

basepath

protected java.lang.String basepath

modules

protected com.google.inject.Module[] modules

stage

protected com.google.inject.Stage stage

classLoader

protected java.lang.ClassLoader classLoader
Constructor Detail

GuiceConfigurationBuilder

public GuiceConfigurationBuilder()

GuiceConfigurationBuilder

public GuiceConfigurationBuilder(java.lang.ClassLoader classLoader)

GuiceConfigurationBuilder

public GuiceConfigurationBuilder(java.lang.String basepath)

GuiceConfigurationBuilder

public GuiceConfigurationBuilder(java.lang.String basepath,
                                 java.lang.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 java.lang.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
java.lang.Exception

getSystemModules

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


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