|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wildfly.extras.creaper.commands.foundation.online.CliFile
public final class CliFile
Apply a list of CLI operations (a CLI script) read from a file. The file is treated as UTF-8 text.
The connect operations in the script are handled specially: bare connect operations without
arguments are simply ignored, as we are already connected, and connect host:port operations (with an argument
that specifies the host and port to connect to) are considered a failure. The script is scanned for the forbidden
connect operations before is it executed, so if this error happens, no operation from the script
has been performed yet.
| Constructor Summary | |
|---|---|
CliFile(Class clazz)
Apply a CLI script from the classpath. |
|
CliFile(File file)
Apply a CLI script from the filesystem ( file). |
|
| Method Summary | |
|---|---|
void |
apply(OnlineCommandContext ctx)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CliFile(File file)
file).
file - an existing file on the filesystem
IllegalArgumentException - if file is null or the file doesn't existpublic CliFile(Class clazz)
clazz and have the .cli extension. On the classpath, the script file must live along
the class file.
clazz - the class that will be used for loading the script and also for discovering its name
IllegalArgumentException - if the clazz is null| Method Detail |
|---|
public void apply(OnlineCommandContext ctx)
throws IOException,
CliException,
CommandFailedException
apply in interface OnlineCommandIOException
CliException
CommandFailedExceptionpublic String toString()
toString in interface OnlineCommandtoString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||