org.abstracthorizon.mercury.smtp.command
Class MailCommand

java.lang.Object
  extended by org.abstracthorizon.mercury.smtp.command.SMTPCommand
      extended by org.abstracthorizon.mercury.smtp.command.MailCommand
All Implemented Interfaces:
org.abstracthorizon.danube.connection.ConnectionHandler
Direct Known Subclasses:
FilterMailCommand, QuietFilterMailCommand

public class MailCommand
extends SMTPCommand

MAIL TO command.

Author:
Daniel Sendula

Constructor Summary
MailCommand()
          Constructor
 
Method Summary
protected  void execute(SMTPSession connection)
          Executed the command
protected  void processMailFrom(SMTPSession connection, Path path)
          Sets from path to the session.
protected  void readExtraParameters(SMTPSession connection, SMTPScanner scanner)
          Obtains extra parameters.
 
Methods inherited from class org.abstracthorizon.mercury.smtp.command.SMTPCommand
handleConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailCommand

public MailCommand()
Constructor

Method Detail

execute

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

Specified by:
execute in class SMTPCommand
Parameters:
connection - smtp session
Throws:
CommandException
IOException
ParserException

readExtraParameters

protected void readExtraParameters(SMTPSession connection,
                                   SMTPScanner scanner)
                            throws IOException,
                                   ParserException,
                                   CommandException
Obtains extra parameters.

Parameters:
session - SMTP session
scanner - STMP scanner
Throws:
IOException - io exception
ParserException - parsing exception
CommandException - command exception

processMailFrom

protected void processMailFrom(SMTPSession connection,
                               Path path)
                        throws IOException
Sets from path to the session. This method can test if and make an different action (sending different response).

Parameters:
path - path to be stored in the session
session - SMTP session
Throws:
IOException


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