com.icegreen.greenmail.imap.commands
Interface ImapCommand


public interface ImapCommand

Represents a processor for a particular Imap command. Implementations of this interface should encpasulate all command specific processing.

Version:
$Revision: 109034 $
Author:
Darrell DeBoer

Method Summary
 String getName()
           
 void process(ImapRequestLineReader request, ImapResponse response, ImapSession session)
          Performs all processing of the current Imap request.
 boolean validForState(ImapSessionState state)
          Specifies if this command is valid for the given session state.
 

Method Detail

getName

String getName()
Returns:
the name of the command, as specified in rfc2060.

validForState

boolean validForState(ImapSessionState state)
Specifies if this command is valid for the given session state.

Parameters:
state - The current state of the ImapSession
Returns:
true if the command is valid in this state.

process

void process(ImapRequestLineReader request,
             ImapResponse response,
             ImapSession session)
Performs all processing of the current Imap request. Reads command arguments from the request, performs processing, and writes responses back to the request object, which are sent to the client.

Parameters:
request - The current client request
response - The current server response
session - The current session