|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.mpt.ProtocolSession
public class ProtocolSession
A protocol session which can be run against a reader and writer, which checks the server response against the expected values. TODO make ProtocolSession itself be a permissible ProtocolElement, so that we can nest and reuse sessions.
| Field Summary | |
|---|---|
protected java.util.List<org.apache.james.mpt.ProtocolSession.ProtocolElement> |
testElements
|
| Constructor Summary | |
|---|---|
ProtocolSession()
|
|
| Method Summary | |
|---|---|
void |
CL(int sessionNumber,
java.lang.String clientLine)
adds a new Client request line to the test elements |
void |
CL(java.lang.String clientLine)
adds a new Client request line to the test elements |
void |
CONT(int sessionNumber)
Adds a continuation. |
void |
doContinue()
|
int |
getSessionCount()
Returns the number of sessions required to run this ProtocolSession. |
boolean |
isContinueAfterFailure()
|
void |
runSessions(Session[] sessions)
Executes the ProtocolSession in real time against the readers and writers supplied, writing client requests and reading server responses in the order that they appear in the test elements. |
void |
setContinueAfterFailure(boolean continueAfterFailure)
|
void |
SL(int sessionNumber,
java.lang.String serverLine,
java.lang.String location,
java.lang.String lastClientMessage)
adds a new Server Response line to the test elements, with the specified location. |
void |
SL(java.lang.String serverLine,
java.lang.String location)
adds a new Server Response line to the test elements, with the specified location. |
void |
SUB(int sessionNumber,
java.util.List<java.lang.String> serverLines,
java.lang.String location,
java.lang.String lastClientMessage)
adds a new Server Unordered Block to the test elements. |
void |
SUB(java.util.List<java.lang.String> serverLines,
java.lang.String location)
adds a new Server Unordered Block to the test elements. |
java.lang.String |
toString()
Constructs a String with all attributes
in name = value format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<org.apache.james.mpt.ProtocolSession.ProtocolElement> testElements
| Constructor Detail |
|---|
public ProtocolSession()
| Method Detail |
|---|
public final boolean isContinueAfterFailure()
public final void setContinueAfterFailure(boolean continueAfterFailure)
public int getSessionCount()
public void runSessions(Session[] sessions)
throws java.lang.Exception
sessions - not null
java.lang.Exceptionpublic void doContinue()
public void CL(java.lang.String clientLine)
ProtocolInteractor
CL in interface ProtocolInteractorProtocolInteractor.CL(java.lang.String)
public void SL(java.lang.String serverLine,
java.lang.String location)
ProtocolInteractor
SL in interface ProtocolInteractorProtocolInteractor.SL(java.lang.String, java.lang.String)
public void SUB(java.util.List<java.lang.String> serverLines,
java.lang.String location)
ProtocolInteractor
SUB in interface ProtocolInteractorProtocolInteractor.SUB(java.util.List, java.lang.String)
public void CL(int sessionNumber,
java.lang.String clientLine)
ProtocolInteractor
CL in interface ProtocolInteractorProtocolInteractor.CL(int, java.lang.String)
public void CONT(int sessionNumber)
throws java.lang.Exception
ProtocolInteractor
CONT in interface ProtocolInteractorjava.lang.ExceptionProtocolInteractor.CONT(int)
public void SL(int sessionNumber,
java.lang.String serverLine,
java.lang.String location,
java.lang.String lastClientMessage)
ProtocolInteractor
SL in interface ProtocolInteractorProtocolInteractor.SL(int, java.lang.String, java.lang.String, java.lang.String)
public void SUB(int sessionNumber,
java.util.List<java.lang.String> serverLines,
java.lang.String location,
java.lang.String lastClientMessage)
ProtocolInteractor
SUB in interface ProtocolInteractorProtocolInteractor.SUB(int, java.util.List, java.lang.String, java.lang.String)public java.lang.String toString()
String with all attributes
in name = value format.
toString in class java.lang.ObjectString representation
of this object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||