org.subethamail.smtp.server
Class CommandHandler

java.lang.Object
  extended by org.subethamail.smtp.server.CommandHandler

public class CommandHandler
extends java.lang.Object

This class manages execution of a SMTP command.

Author:
Jon Stevens, Scott Hernandez

Constructor Summary
CommandHandler()
           
CommandHandler(java.util.Collection<Command> availableCommands)
           
 
Method Summary
 void addCommand(Command command)
           
 boolean containsCommand(java.lang.String command)
           
 HelpMessage getHelp(java.lang.String command)
           
 java.util.Set<java.lang.String> getVerbs()
           
 void handleCommand(Session context, java.lang.String commandString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandHandler

public CommandHandler()

CommandHandler

public CommandHandler(java.util.Collection<Command> availableCommands)
Method Detail

addCommand

public void addCommand(Command command)

containsCommand

public boolean containsCommand(java.lang.String command)

getVerbs

public java.util.Set<java.lang.String> getVerbs()

handleCommand

public void handleCommand(Session context,
                          java.lang.String commandString)
                   throws java.net.SocketTimeoutException,
                          java.io.IOException
Throws:
java.net.SocketTimeoutException
java.io.IOException

getHelp

public HelpMessage getHelp(java.lang.String command)
                    throws CommandException
Returns:
the HelpMessage object for the given command name (verb)
Throws:
CommandException


Copyright © 2009 SubEthaSMTP. All Rights Reserved. Build version: UNVERSIONED