public class Test
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
Test.Arguments
small class to wrap the arguments of a command
|
private static class |
Test.AuthInfo1Create
operation to set the authinfo 1
|
private static class |
Test.BaseOperation
common base class for operations with some helpers
|
private static interface |
Test.Command
small interface to a class that executes commands on a given port
|
private static class |
Test.ContactCI
contact check/info operation
|
private static class |
Test.ContactCU
common class for contact create and update
|
private static class |
Test.DomainCU
common class for domain operations requiring the full data
|
private static class |
Test.DomainDelete
operation to delete a domain
|
private static class |
Test.DomainInfo
operation to retrieve information about a domain
|
private static class |
Test.DomainSimple<T extends Request>
common class for domain operations requiring only the domain name
|
private static interface |
Test.Operation
interface to an operation
|
private static class |
Test.ParallelCommand
class that executes the given commands in parallel
|
private static class |
Test.QueueDelete
operation to delete a message
|
private static class |
Test.QueueDeleteAll
operation to delete all messages
|
private static class |
Test.QueueRead
operation to retrieve the oldest message
|
private static class |
Test.RepeatCommand
class that repeats a command a given number of times
|
private static class |
Test.SequentialCommand
class that executes the given commands sequentially
|
Modifier and Type | Field and Description |
---|---|
private static java.util.regex.Pattern |
argPattern
pattern to split lines
|
private java.io.BufferedReader |
batchReader
the buffered reader while parsing
|
private static java.util.Map<java.lang.String,Test.Operation> |
operations
the operations
|
private java.lang.String[] |
parsedArgs
the last parsed arguments during parsing
|
Constructor and Description |
---|
Test() |
Modifier and Type | Method and Description |
---|---|
private static void |
addOperation(Test.Operation op)
add an operation
|
private void |
doMain(java.lang.String[] args)
the main program
|
private static boolean |
isAscii(java.lang.String name)
return whether the given domain name only contains ASCII characters
|
static void |
main(java.lang.String[] args)
main program
|
private Test.Command |
parseBatchFile(java.io.BufferedReader reader)
parse the given batch file
|
private Test.Command |
parseBatchSection(java.lang.String... stopWords)
parse a section of the batch file
|
private static Test.Command |
parseCommand(java.lang.String[] args,
int offset)
execute a command
|
private java.lang.String[] |
splitArgs(java.lang.String line)
split a line into arguments.
|
private java.io.BufferedReader batchReader
private java.lang.String[] parsedArgs
private static final java.util.Map<java.lang.String,Test.Operation> operations
private static java.util.regex.Pattern argPattern
private static void addOperation(Test.Operation op)
op
- the operationprivate static boolean isAscii(java.lang.String name)
name
- the nametrue
if soprivate static Test.Command parseCommand(java.lang.String[] args, int offset)
args
- the argumentsoffset
- the index to the first argument to usenull
if command could not be parsedprivate java.lang.String[] splitArgs(java.lang.String line)
line
- the lineprivate Test.Command parseBatchSection(java.lang.String... stopWords) throws java.io.IOException
stopWords
- the words to stop parsingnull
if end of input has been encountered
without reading a single commandjava.io.IOException
- on exceptions while readingprivate Test.Command parseBatchFile(java.io.BufferedReader reader) throws java.io.IOException
reader
- the readerjava.io.IOException
- on i/o exceptionsprivate void doMain(java.lang.String[] args)
args
- the command line argumentspublic static void main(java.lang.String[] args)
args
- the command line argumentsCopyright © 2005-2013 Knipp Medien und Kommunikation GmbH