com.xpn.xwiki.test.smtp
Class SmtpRequest

java.lang.Object
  extended by com.xpn.xwiki.test.smtp.SmtpRequest

public class SmtpRequest
extends java.lang.Object

Contains an SMTP client request.


Field Summary
private  SmtpActionType action
          SMTP action received from client.
private  java.lang.String params
          Additional information passed from the client with the SMTP action.
private  SmtpState state
          Current state of the SMTP state table.
 
Constructor Summary
SmtpRequest(SmtpActionType actionType, java.lang.String params, SmtpState state)
          Create a new SMTP client request.
 
Method Summary
static SmtpRequest createRequest(java.lang.String s, SmtpState state)
          Create an SMTP request object given a line of the input stream from the client and the current internal state.
 SmtpResponse execute()
          Execute the SMTP request returning a response.
 java.lang.String getParams()
          Get the parameters of this request (remainder of command line once the command is removed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

action

private SmtpActionType action
SMTP action received from client.


state

private SmtpState state
Current state of the SMTP state table.


params

private java.lang.String params
Additional information passed from the client with the SMTP action.

Constructor Detail

SmtpRequest

public SmtpRequest(SmtpActionType actionType,
                   java.lang.String params,
                   SmtpState state)
Create a new SMTP client request.

Parameters:
actionType - type of action/command
params - remainder of command line once command is removed
state - current SMTP server state
Method Detail

execute

public SmtpResponse execute()
Execute the SMTP request returning a response. This method models the state transition table for the SMTP server.

Returns:
reponse to the request

createRequest

public static SmtpRequest createRequest(java.lang.String s,
                                        SmtpState state)
Create an SMTP request object given a line of the input stream from the client and the current internal state.

Parameters:
s - line of input
state - current state
Returns:
a populated SmtpRequest object

getParams

public java.lang.String getParams()
Get the parameters of this request (remainder of command line once the command is removed.

Returns:
parameters


Copyright 2003 Ludovic Dubost