org.jboss.shrinkwrap.api
Class ConfigurationBuilder

java.lang.Object
  extended by org.jboss.shrinkwrap.api.ConfigurationBuilder

public class ConfigurationBuilder
extends Object

Mutable construction object for new instances of Configuration. Provides defaults for each property if not specified (null) according to the following:

Not thread-safe. When done altering properties here, a new configuration may be constructed by calling upon build().

Version:
$Revision: $
Author:
ALR, Ken Gullaksen

Constructor Summary
ConfigurationBuilder()
          Creates a new builder initialized to defaults (null) values.
 
Method Summary
 Configuration build()
          Builds a new Configuration using the properties contained in this builder.
 ConfigurationBuilder classLoaders(Iterable<ClassLoader> classLoaders)
          Sets the ClassLoader used in resolving extension implementations by the ExtensionLoader; other tasks requiring a CL by the Archive
 ConfigurationBuilder executorService(ExecutorService executorService)
          Sets the ExecutorService to be used, returning this instance
 ConfigurationBuilder extensionLoader(ExtensionLoader extensionLoader)
          Sets the ExtensionLoader to be used, returning this instance
 Iterable<ClassLoader> getClassLoaders()
           
 ExecutorService getExecutorService()
           
 ExtensionLoader getExtensionLoader()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationBuilder

public ConfigurationBuilder()
Creates a new builder initialized to defaults (null) values. Any properties not explicitly provided by the user will be defaulted during build().

Method Detail

getExtensionLoader

public ExtensionLoader getExtensionLoader()
Returns:
the extensionLoader

getExecutorService

public ExecutorService getExecutorService()
Returns:
the executorService

getClassLoaders

public Iterable<ClassLoader> getClassLoaders()
Returns:

extensionLoader

public ConfigurationBuilder extensionLoader(ExtensionLoader extensionLoader)
Sets the ExtensionLoader to be used, returning this instance

Parameters:
extensionLoader -
Returns:

executorService

public ConfigurationBuilder executorService(ExecutorService executorService)
Sets the ExecutorService to be used, returning this instance

Parameters:
executorService -
Returns:

classLoaders

public ConfigurationBuilder classLoaders(Iterable<ClassLoader> classLoaders)
Sets the ClassLoader used in resolving extension implementations by the ExtensionLoader; other tasks requiring a CL by the Archive

Parameters:
classLoaders -
Returns:

build

public Configuration build()
Builds a new Configuration using the properties contained in this builder. In the case a property has not been specified, it will be defaulted according to the rules set forth in this ConfigurationBuilder's contract.

Returns:


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.