org.apache.jsieve
Class ConfigurationManager

java.lang.Object
  extended by org.apache.jsieve.ConfigurationManager

public class ConfigurationManager
extends java.lang.Object

ConfigurationManager parses the XML statements in the Sieve configuration file and translates them to Java objects.

The Sieve configuration is read from 3 properties files

They are located by searching the classpath of the current ClassLoader.

Thread Safety

Each configuration manager instance may be safely accessed by concurrent threads.

The managers constructed by

and the SieveFactory built by

may be safely shared by multiple threads.


Constructor Summary
ConfigurationManager()
          Constructor for ConfigurationManager.
 
Method Summary
 SieveFactory build()
           
 CommandManager getCommandManager()
           
 java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> getCommandMap()
          Method getCommandMap answers a Map of Command names and their associated class names, lazily initialized if required.
 ComparatorManager getComparatorManager()
           
 java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> getComparatorMap()
          Method getComparatorMap answers a Map of Comparator names and their associated class names, lazily initialized if required.
 int getInitialConcurrencyLevel()
          Gets the current initial size for the ConcurrentHashMap concurrency level.
 org.apache.commons.logging.Log getLog()
           
 TestManager getTestManager()
           
 java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> getTestMap()
          Method getTestMap answers a Map of Test names and their associated class names, lazily initialized if required.
 void setInitialConcurrencyLevel(int initialConcurrencyLevel)
          Sets the current initial size for the ConcurrentHashMap concurrency level.
 void setLog(org.apache.commons.logging.Log log)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationManager

public ConfigurationManager()
                     throws SieveConfigurationException
Constructor for ConfigurationManager.

Throws:
SieveConfigurationException
Method Detail

getInitialConcurrencyLevel

public int getInitialConcurrencyLevel()
Gets the current initial size for the ConcurrentHashMap concurrency level.

Returns:
number of concurrent threads estimated for initial sizing

setInitialConcurrencyLevel

public void setInitialConcurrencyLevel(int initialConcurrencyLevel)
Sets the current initial size for the ConcurrentHashMap concurrency level.

Parameters:
initialConcurrencyLevel - number of concurrent threads estimated for initial sizing

getCommandMap

public java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> getCommandMap()
Method getCommandMap answers a Map of Command names and their associated class names, lazily initialized if required.

Returns:
Map not null

getTestMap

public java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> getTestMap()
Method getTestMap answers a Map of Test names and their associated class names, lazily initialized if required.

Returns:
Map not null

getComparatorMap

public java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> getComparatorMap()
Method getComparatorMap answers a Map of Comparator names and their associated class names, lazily initialized if required.

Returns:
Map not null

getComparatorManager

public ComparatorManager getComparatorManager()

getCommandManager

public CommandManager getCommandManager()

getTestManager

public TestManager getTestManager()

getLog

public org.apache.commons.logging.Log getLog()

setLog

public void setLog(org.apache.commons.logging.Log log)

build

public SieveFactory build()


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.