org.apache.jsieve
Class CommandManagerImpl

java.lang.Object
  extended by org.apache.jsieve.CommandManagerImpl
All Implemented Interfaces:
CommandManager

public class CommandManagerImpl
extends java.lang.Object
implements CommandManager

Maps command names to comman implementations.


Constructor Summary
CommandManagerImpl(java.util.Map classNameMap)
          Constructor for CommandManager.
 
Method Summary
protected  java.lang.String getClassName(java.lang.String name)
           Method getClassName answers the name of the class to which a Command name is mapped.
 ExecutableCommand getCommand(java.lang.String name)
           Method newInstance answers an instance of the class to which a Command name is mapped.
 boolean isCommandSupported(java.lang.String name)
          Method isSupported answers a boolean indicating if a Command name is configured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandManagerImpl

public CommandManagerImpl(java.util.Map classNameMap)
Constructor for CommandManager.

Method Detail

getCommand

public ExecutableCommand getCommand(java.lang.String name)
                             throws LookupException

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

Specified by:
getCommand in interface CommandManager
Parameters:
name - - The name of the Command
Returns:
Class - The class of the Command
Throws:
LookupException

isCommandSupported

public boolean isCommandSupported(java.lang.String name)
Method isSupported answers a boolean indicating if a Command name is configured.

Specified by:
isCommandSupported in interface CommandManager
Parameters:
name - - The Command name
Returns:
boolean - True if the Command name is configured.

getClassName

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

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

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


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