|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.test.functional.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.
Nested Class Summary | |
---|---|
class |
ProtocolSession.InvalidServerResponseException
An exception which is thrown when the actual response from a server is different from that expected. |
Field Summary | |
---|---|
protected java.util.List |
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(HostSystem.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 serverLines,
java.lang.String location,
java.lang.String lastClientMessage)
adds a new Server Unordered Block to the test elements. |
void |
SUB(java.util.List serverLines,
java.lang.String location)
adds a new Server Unordered Block to the test elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List testElements
Constructor Detail |
---|
public ProtocolSession()
Method Detail |
---|
public final boolean isContinueAfterFailure()
public final void setContinueAfterFailure(boolean continueAfterFailure)
public int getSessionCount()
public void runSessions(HostSystem.Session[] sessions) throws java.lang.Exception
out
- The client requests are written to here.in
- The server responses are read from here.
java.lang.Exception
public void doContinue()
public void CL(java.lang.String clientLine)
public void SL(java.lang.String serverLine, java.lang.String location)
public void SUB(java.util.List serverLines, java.lang.String location)
public void CL(int sessionNumber, java.lang.String clientLine)
public void CONT(int sessionNumber) throws java.lang.Exception
java.lang.Exception
public void SL(int sessionNumber, java.lang.String serverLine, java.lang.String location, java.lang.String lastClientMessage)
public void SUB(int sessionNumber, java.util.List serverLines, java.lang.String location, java.lang.String lastClientMessage)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |