org.wildfly.extras.creaper.commands.foundation.online
Class CliScript

java.lang.Object
  extended by 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.


Field Summary
 
Fields inherited from interface org.wildfly.extras.creaper.core.online.OnlineCommand
NOOP
 
Constructor Summary
CliScript(String script)
          Apply the given CLI script.
 
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

CliScript

public CliScript(String script)
Apply the given CLI script.

Parameters:
script - the text of the CLI script
Method Detail

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.