|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sonyericsson.hudson.plugins.gerrit.trigger.test.SshdServerMock.CommandLookup
public static class SshdServerMock.CommandLookup
Utility class for looking up and creating commands.
SshdServerMock.findAndCreateCommand(String)| Constructor Summary | |
|---|---|
SshdServerMock.CommandLookup(Class<? extends SshdServerMock.CommandMock> cmdClass,
Pattern commandPattern,
boolean oneShot,
Constructor<? extends SshdServerMock.CommandMock> constructor,
Object... arguments)
Standard constructor. |
|
SshdServerMock.CommandLookup(Class<? extends SshdServerMock.CommandMock> cmdClass,
String commandPattern,
boolean oneShot,
Constructor<? extends SshdServerMock.CommandMock> constructor,
Object... arguments)
Standard constructor. |
|
| Method Summary | |
|---|---|
boolean |
isCommand(String command)
If the given command matches the pattern. |
boolean |
isOneShot()
|
SshdServerMock.CommandMock |
newInstance(String command)
Creates a new instance of the command with all it's parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SshdServerMock.CommandLookup(Class<? extends SshdServerMock.CommandMock> cmdClass,
Pattern commandPattern,
boolean oneShot,
Constructor<? extends SshdServerMock.CommandMock> constructor,
Object... arguments)
cmdClass - the class of the command to create.commandPattern - a regular expression matching a command the creation should be performed on.oneShot - if this command should only be returned the first time it is called for.constructor - the constructor of the command to call.arguments - the arguments to the constructor except for the first actual command.SshdServerMock.returnCommandFor(String, Class),
SshdServerMock.returnCommandFor(String, Class, Object[], Class[])
public SshdServerMock.CommandLookup(Class<? extends SshdServerMock.CommandMock> cmdClass,
String commandPattern,
boolean oneShot,
Constructor<? extends SshdServerMock.CommandMock> constructor,
Object... arguments)
cmdClass - the class of the command to create.commandPattern - a regular expression matching a command the creation should be performed on.oneShot - if this command should only be returned the first time it is called for.constructor - the constructor of the command to call.arguments - the arguments to the constructor except for the first actual command.SshdServerMock.returnCommandFor(String, Class),
SshdServerMock.returnCommandFor(String, Class, Object[], Class[])| Method Detail |
|---|
public boolean isCommand(String command)
command - the command
public boolean isOneShot()
public SshdServerMock.CommandMock newInstance(String command)
command - the first parameter to the constructor.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||