|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.mpt.ProtocolSessionBuilder
public class ProtocolSessionBuilder
A builder which generates scripts from textual input.
| Field Summary | |
|---|---|
static java.lang.String |
CLIENT_TAG
|
static java.lang.String |
CLOSE_UNORDERED_BLOCK_TAG
|
static java.lang.String |
COMMENT_TAG
|
static java.lang.String |
OPEN_UNORDERED_BLOCK_TAG
|
static java.lang.String |
SERVER_CONTINUATION_TAG
|
static java.lang.String |
SERVER_TAG
|
static java.lang.String |
SESSION_TAG
|
| Constructor Summary | |
|---|---|
ProtocolSessionBuilder()
|
|
| Method Summary | |
|---|---|
void |
addProtocolLines(java.lang.String scriptName,
java.io.InputStream is,
ProtocolInteractor session)
Reads ProtocolElements from the supplied InputStream and adds them to the ProtocolSession. |
void |
addProtocolLines(java.lang.String scriptName,
java.io.Reader reader,
ProtocolInteractor session)
Reads ProtocolElements from the supplied Reader and adds them to the ProtocolSession. |
void |
addTestFile(java.lang.String fileName,
ProtocolInteractor session)
Adds all protocol elements from a test file to the ProtocolSession supplied. |
ProtocolInteractor |
buildProtocolSession(java.lang.String fileName)
Builds a ProtocolSession by reading lines from the test file with the supplied name. |
ProtocolInteractor |
buildProtocolSession(java.lang.String scriptName,
java.io.Reader reader)
Builds a ProtocolSession by reading lines from the reader. |
void |
setVariable(java.lang.String name,
java.lang.String value)
Sets a substitution varaible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SERVER_CONTINUATION_TAG
public static final java.lang.String CLIENT_TAG
public static final java.lang.String SERVER_TAG
public static final java.lang.String OPEN_UNORDERED_BLOCK_TAG
public static final java.lang.String CLOSE_UNORDERED_BLOCK_TAG
public static final java.lang.String COMMENT_TAG
public static final java.lang.String SESSION_TAG
| Constructor Detail |
|---|
public ProtocolSessionBuilder()
| Method Detail |
|---|
public void setVariable(java.lang.String name,
java.lang.String value)
NAME} is found in the input
where NAME is the name of the variable.
name - not nullvalue - not null
public ProtocolInteractor buildProtocolSession(java.lang.String fileName)
throws java.lang.Exception
fileName - The name of the protocol session file.
java.lang.Exception
public ProtocolInteractor buildProtocolSession(java.lang.String scriptName,
java.io.Reader reader)
throws java.lang.Exception
scriptName - not nullreader - not null
java.lang.Exception
public void addTestFile(java.lang.String fileName,
ProtocolInteractor session)
throws java.lang.Exception
fileName - The name of the protocol session file.session - The ProtocolSession to add the elements to.
java.lang.Exception
public void addProtocolLines(java.lang.String scriptName,
java.io.InputStream is,
ProtocolInteractor session)
throws java.lang.Exception
scriptName - The name of the source file, for error messages.is - The input stream containing the protocol definition.session - The ProtocolSession to add elements to.
java.lang.Exception
public void addProtocolLines(java.lang.String scriptName,
java.io.Reader reader,
ProtocolInteractor session)
throws java.lang.Exception
scriptName - The name of the source file, for error messages.reader - the reader containing the protocol definition.session - The ProtocolSession to add elements to.
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||