org.abstracthorizon.mercury.smtp.command
Class SMTPCommand

java.lang.Object
  extended by org.abstracthorizon.mercury.smtp.command.SMTPCommand
All Implemented Interfaces:
org.abstracthorizon.danube.connection.ConnectionHandler
Direct Known Subclasses:
DataCommand, MailCommand, NoopCommand, NotImplementedCommand, QuitCommand, RcptCommand, ResetCommand

public abstract class SMTPCommand
extends Object
implements org.abstracthorizon.danube.connection.ConnectionHandler

Base SMTP comamnd. It defines handling of exceptions from commands

Author:
Daniel Sendula

Constructor Summary
SMTPCommand()
          Constructor
 
Method Summary
protected abstract  void execute(SMTPSession connection)
          Executed the command
 void handleConnection(org.abstracthorizon.danube.connection.Connection connection)
          Executed the command calling execute(SMTPSession) method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMTPCommand

public SMTPCommand()
Constructor

Method Detail

handleConnection

public void handleConnection(org.abstracthorizon.danube.connection.Connection connection)
Executed the command calling execute(SMTPSession) method

Specified by:
handleConnection in interface org.abstracthorizon.danube.connection.ConnectionHandler
Parameters:
connection - smtp session

execute

protected abstract void execute(SMTPSession connection)
                         throws CommandException,
                                IOException,
                                ParserException
Executed the command

Parameters:
connection - smtp session
Throws:
CommandException
IOException
ParserException


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