org.mailster.pop3.commands
Class Pop3Command

java.lang.Object
  extended by org.mailster.pop3.commands.Pop3Command
Direct Known Subclasses:
ApopCommand, CapaCommand, DeleCommand, ImplCommand, ListCommand, MultiStatePop3Command, NoopCommand, PassCommand, QuitCommand, RetrCommand, RsetCommand, StartTLSCommand, StatCommand, TopCommand, UidlCommand, UserCommand

public abstract class Pop3Command
extends java.lang.Object

---
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
---

Pop3Command.java - Abstract class that defines what a POP3 command class has to implement to be registered in the command registry.

Version:
$Revision: 1.7 $, $Date: 2009/02/15 00:55:21 $
Author:
Edouard De Oliveira

Constructor Summary
Pop3Command()
           
 
Method Summary
abstract  void execute(AbstractPop3Handler handler, AbstractPop3Connection conn, java.lang.String cmd)
          Executes the command.
abstract  boolean isValidForState(Pop3State state)
          Checks if command is valid for the specified POP3 state.
 void tryLockingMailbox(AbstractPop3Connection conn)
          Try to lock a mailbox after a successfull login.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pop3Command

public Pop3Command()
Method Detail

isValidForState

public abstract boolean isValidForState(Pop3State state)
Checks if command is valid for the specified POP3 state.

Parameters:
state - the POP3 state
Returns:
true, if is valid for state

execute

public abstract void execute(AbstractPop3Handler handler,
                             AbstractPop3Connection conn,
                             java.lang.String cmd)
Executes the command.

Parameters:
handler - a pop3 handler
conn - a pop3 connection
cmd - the command line sent by the client

tryLockingMailbox

public void tryLockingMailbox(AbstractPop3Connection conn)
Try to lock a mailbox after a successfull login.

Parameters:
conn - the connection