org.mailster.pop3.commands
Class MultiStatePop3Command

java.lang.Object
  extended by org.mailster.pop3.commands.Pop3Command
      extended by org.mailster.pop3.commands.MultiStatePop3Command
Direct Known Subclasses:
AuthAlgorithmCommand, AuthCommand

public abstract class MultiStatePop3Command
extends Pop3Command

---
Mailster (C) 2007-2009 De Oliveira Edouard

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

See  Mailster Web Site
---

MultiStatePop3Command.java - Abstract class that defines a POP3 command that has multiple states.

Version:
$Revision: 1.3 $, $Date: 2008/12/06 13:57:16 $
Author:
Edouard De Oliveira

Constructor Summary
MultiStatePop3Command()
           
 
Method Summary
 void execute(AbstractPop3Handler handler, AbstractPop3Connection conn, java.lang.String cmd)
          Executes the command.
abstract  Pop3CommandState execute(AbstractPop3Handler handler, AbstractPop3Connection conn, java.lang.String cmd, Pop3CommandState state)
          Executes the command.
 
Methods inherited from class org.mailster.pop3.commands.Pop3Command
isValidForState, tryLockingMailbox
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiStatePop3Command

public MultiStatePop3Command()
Method Detail

execute

public abstract Pop3CommandState execute(AbstractPop3Handler handler,
                                         AbstractPop3Connection conn,
                                         java.lang.String cmd,
                                         Pop3CommandState state)
Executes the command. If the state returned is different from Pop3CommandState.COMPLETED_STATE or Pop3CommandState.ERROR_STATE, it means that execution of the command needs some additional request/response steps to complete its execution.

Parameters:
handler - a pop3 handler
conn - a pop3 connection
cmd - the command line sent by the client
state - the state of the command execution, if null it's considered to be in the initial state.
Returns:
a Pop3CommandState as the next state of the command

execute

public void execute(AbstractPop3Handler handler,
                    AbstractPop3Connection conn,
                    java.lang.String cmd)
Description copied from class: Pop3Command
Executes the command.

Specified by:
execute in class Pop3Command
Parameters:
handler - a pop3 handler
conn - a pop3 connection
cmd - the command line sent by the client