org.abstracthorizon.mercury.imap.cmd
Class IMAPCommandFactory

java.lang.Object
  extended by org.abstracthorizon.mercury.imap.cmd.IMAPCommandFactory

public class IMAPCommandFactory
extends Object

IMAP Commands factory

Author:
Daniel Sendula

Field Summary
protected static Map<String,Class<? extends IMAPCommand>> commands
          Map of commands
protected static org.slf4j.Logger logger
          Logger
 
Constructor Summary
IMAPCommandFactory()
          Constructor
 
Method Summary
protected static void add(String mnemonic, Class<? extends IMAPCommand> c)
          Adds new command
 org.abstracthorizon.danube.connection.ConnectionHandler getCommand(String mnemonic)
          Returns requested command
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.slf4j.Logger logger
Logger


commands

protected static Map<String,Class<? extends IMAPCommand>> commands
Map of commands

Constructor Detail

IMAPCommandFactory

public IMAPCommandFactory()
Constructor

Method Detail

add

protected static void add(String mnemonic,
                          Class<? extends IMAPCommand> c)
Adds new command

Parameters:
mnemonic - mnemonic
c - command

getCommand

public org.abstracthorizon.danube.connection.ConnectionHandler getCommand(String mnemonic)
                                                                   throws CommandException
Returns requested command

Parameters:
mnemonic - mnemonic
Returns:
command or Bad if command can't be found
Throws:
CommandException


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.