org.apache.jsieve
Class TestManager

java.lang.Object
  extended byorg.apache.jsieve.TestManager

public class TestManager
extends java.lang.Object

Singleton class TestManager maps Test names to configured Test implementation classes.


Method Summary
protected static TestManager computeInstance()
          Computes a new instance of the receiver.
protected  java.lang.String getClassName(java.lang.String name)
           Method getClassName answers the name of the class to which a Test name is mapped.
protected  java.util.Map getClassNameMap()
          Method getClassNameMap answers a Map of Test names and their class names.
static TestManager getInstance()
          Returns the sole instance of the reciever, lazily initialised if required.
 java.lang.Class lookup(java.lang.String name)
           Method lookup answers the class to which a Test name is mapped.
 ExecutableTest newInstance(java.lang.String name)
           Method newInstance answers an instance of the class to which a Test name is mapped.
static void resetInstance()
          Resets the sole instance of the reciever.
protected static void setInstance(TestManager instance)
          Sets the sole instance of the reciever.
protected static void updateInstance()
          Updates the sole instance of the reciever.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TestManager getInstance()
Returns the sole instance of the reciever, lazily initialised if required.

Returns:
CommandManager

computeInstance

protected static TestManager computeInstance()
Computes a new instance of the receiver.

Returns:
CommandManager

setInstance

protected static void setInstance(TestManager instance)
Sets the sole instance of the reciever.

Parameters:
instance - The instance to set

resetInstance

public static void resetInstance()
Resets the sole instance of the reciever.


updateInstance

protected static void updateInstance()
Updates the sole instance of the reciever.


lookup

public java.lang.Class lookup(java.lang.String name)
                       throws LookupException

Method lookup answers the class to which a Test name is mapped.

Parameters:
name - - The name of the Test
Returns:
Class - The class of the Test
Throws:
LookupException

newInstance

public ExecutableTest newInstance(java.lang.String name)
                           throws LookupException

Method newInstance answers an instance of the class to which a Test name is mapped.

Parameters:
name - - The name of the Test
Returns:
Class - The class of the Test
Throws:
LookupException

getClassName

protected java.lang.String getClassName(java.lang.String name)
                                 throws LookupException

Method getClassName answers the name of the class to which a Test name is mapped.

Parameters:
name - - The name of the Test
Returns:
String - The name of the class
Throws:
LookupException

getClassNameMap

protected java.util.Map getClassNameMap()
                                 throws SieveConfigurationException
Method getClassNameMap answers a Map of Test names and their class names.

Returns:
Map
Throws:
SieveConfigurationException


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