org.wildfly.extras.creaper.commands.foundation.online
Class CliScript
java.lang.Object
org.wildfly.extras.creaper.commands.foundation.online.CliScript
- All Implemented Interfaces:
- Command, OnlineCommand
public final class CliScript
- extends Object
- implements OnlineCommand
Apply a list of CLI operations (a CLI script), provided as a String. If you want to read the script
from a file or a classpath resource, use the CliFile command.
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.
| Fields inherited from interface org.wildfly.extras.creaper.core.online.OnlineCommand |
NOOP |
CliScript
public CliScript(String script)
- Apply the given CLI
script.
- Parameters:
script - the text of the CLI script
apply
public void apply(OnlineCommandContext ctx)
throws Exception
- Specified by:
apply in interface OnlineCommand
- Throws:
Exception
toString
public String toString()
- Specified by:
toString in interface OnlineCommand- Overrides:
toString in class Object
Copyright © 2016. All rights reserved.