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

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 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
 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

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:

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 © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.