|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.otfeed.support.CommandRunner
public class CommandRunner
Class that runs a list of commands, then waits for the completion. Sometimes useful in scripts.
Constructor Summary | |
---|---|
CommandRunner()
Creates new CommandRunner. |
|
CommandRunner(IConnectionFactory cf,
java.util.List<ICommand> commands)
Creates new CommandRunner from a given connection factory, with the given list of commands. |
Method Summary | |
---|---|
java.util.List<ICommand> |
getCommandList()
List of commands to execute. |
IConnectionFactory |
getConnectionFactory()
Connection factory to use. |
IConnectionStateListener |
getConnectionStateListener()
Listener that watches connection-level events. |
void |
runCommands()
Main method: connects to the server and executes all commands. |
void |
runCommands(long timeout)
Main method: connects to the server and executes all commands. |
void |
setCommandList(java.util.List<ICommand> val)
Sets list of commands. |
void |
setConnectionFactory(IConnectionFactory val)
Sets the connection factory. |
void |
setConnectionStateListener(IConnectionStateListener val)
Sets connection state listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandRunner()
public CommandRunner(IConnectionFactory cf, java.util.List<ICommand> commands)
cf
- connection factory.commands
- list of commands.Method Detail |
---|
public IConnectionFactory getConnectionFactory()
public void setConnectionFactory(IConnectionFactory val)
val
- connection factory.public java.util.List<ICommand> getCommandList()
public void setCommandList(java.util.List<ICommand> val)
val
- list of commands.public IConnectionStateListener getConnectionStateListener()
SimpleConnectionStateListener
,
which will print the events to the System.err.
public void setConnectionStateListener(IConnectionStateListener val)
val
- connection state listener.public void runCommands() throws java.lang.Exception
java.lang.Exception
- is something is not
configured correctly, or something goes extremely
wrong at the runtime.public void runCommands(long timeout) throws java.lang.Exception
timeout
- how long to wait for the request to complete (in milliseconds).
java.lang.Exception
- if something is not
configured correctly, or something goes extremely
wrong at the runtime.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |