org.subethamail.smtp.server
Class BaseCommand
java.lang.Object
org.subethamail.smtp.server.BaseCommand
- All Implemented Interfaces:
- Command
- Direct Known Subclasses:
- AuthCommand, DataCommand, EhloCommand, HelloCommand, HelpCommand, MailCommand, NoopCommand, QuitCommand, ReceiptCommand, ResetCommand, StartTLSCommand, VerifyCommand
public abstract class BaseCommand
- extends Object
- implements Command
- Author:
- Ian McFarland <ian@neo.com>, Jon Stevens, Jeff Schnitzer, Scott Hernandez
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseCommand
protected BaseCommand(String name,
String help)
BaseCommand
protected BaseCommand(String name,
String help,
String argumentDescription)
execute
public abstract void execute(String commandString,
Session context)
throws IOException,
DropConnectionException
- This is the main method that you need to override in order to implement a command.
- Specified by:
execute in interface Command
- Throws:
IOException
DropConnectionException
getHelp
public HelpMessage getHelp()
- Specified by:
getHelp in interface Command
getName
public String getName()
- Description copied from interface:
Command
- Returns the name of the command in upper case. For example "QUIT".
- Specified by:
getName in interface Command
getArgPredicate
protected String getArgPredicate(String commandString)
getArgs
protected String[] getArgs(String commandString)
Copyright © 2006-2012. All Rights Reserved.