public class DMRCommandContext extends Object implements org.jboss.as.cli.CommandContext
| Constructor and Description |
|---|
DMRCommandContext(org.jboss.as.cli.CommandContext delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(org.jboss.as.cli.CliEventListener listener) |
void |
bindClient(org.jboss.as.controller.client.ModelControllerClient newClient) |
org.jboss.dmr.ModelNode |
buildRequest(String line) |
void |
captureOutput(PrintStream captor) |
void |
clear(org.jboss.as.cli.CommandContext.Scope scope) |
void |
clearScreen() |
void |
connectController() |
void |
connectController(String controller) |
void |
connectController(String host,
int port) |
void |
connectController(String arg0,
String arg1) |
void |
disconnectController() |
org.jboss.dmr.ModelNode |
execute(org.jboss.dmr.ModelNode mn,
String description) |
org.jboss.dmr.ModelNode |
execute(org.jboss.as.controller.client.Operation op,
String description) |
Object |
get(org.jboss.as.cli.CommandContext.Scope scope,
String key) |
String |
getArgumentsString() |
org.jboss.as.cli.batch.BatchManager |
getBatchManager() |
org.jboss.as.cli.operation.CommandLineParser |
getCommandLineParser() |
int |
getCommandTimeout() |
org.jboss.as.cli.CliConfig |
getConfig() |
org.jboss.as.cli.ConnectionInfo |
getConnectionInfo() |
String |
getControllerHost() |
int |
getControllerPort() |
File |
getCurrentDir() |
org.jboss.as.cli.operation.OperationRequestAddress |
getCurrentNodePath() |
org.jboss.as.cli.CommandLineCompleter |
getDefaultCommandCompleter() |
org.jboss.as.cli.ControllerAddress |
getDefaultControllerAddress() |
String |
getDefaultControllerHost() |
int |
getDefaultControllerPort() |
int |
getExitCode() |
org.jboss.as.cli.CommandHistory |
getHistory() |
org.jboss.as.controller.client.ModelControllerClient |
getModelControllerClient() |
org.jboss.as.cli.operation.NodePathFormatter |
getNodePathFormatter() |
org.jboss.as.cli.operation.OperationCandidatesProvider |
getOperationCandidatesProvider() |
org.jboss.as.cli.operation.ParsedCommandLine |
getParsedCommandLine() |
int |
getTerminalHeight() |
int |
getTerminalWidth() |
String |
getVariable(String name) |
Collection<String> |
getVariables() |
void |
handle(String line) |
void |
handleSafe(String line) |
void |
interact() |
boolean |
isBatchMode() |
boolean |
isDomainMode() |
boolean |
isResolveParameterValues() |
boolean |
isSilent() |
boolean |
isTerminated() |
boolean |
isWorkflowMode() |
void |
printColumns(Collection<String> col) |
void |
printLine(String message) |
void |
registerRedirection(org.jboss.as.cli.CommandLineRedirection redirection) |
void |
releaseOutput() |
Object |
remove(org.jboss.as.cli.CommandContext.Scope scope,
String key) |
void |
resetTimeout(org.jboss.as.cli.CommandContext.TIMEOUT_RESET_VALUE value) |
void |
set(org.jboss.as.cli.CommandContext.Scope scope,
String key,
Object value) |
void |
setCommandTimeout(int numSeconds) |
void |
setCurrentDir(File dir) |
void |
setModelControllerClient(org.jboss.as.controller.client.ModelControllerClient mcc) |
void |
setResolveParameterValues(boolean resolve) |
void |
setSilent(boolean silent) |
void |
setVariable(String name,
String value) |
void |
terminateSession() |
org.jboss.as.cli.batch.BatchedCommand |
toBatchedCommand(String line) |
public DMRCommandContext(org.jboss.as.cli.CommandContext delegate)
public org.jboss.as.cli.CliConfig getConfig()
getConfig in interface org.jboss.as.cli.CommandContextpublic String getArgumentsString()
getArgumentsString in interface org.jboss.as.cli.CommandContextpublic org.jboss.as.cli.operation.ParsedCommandLine getParsedCommandLine()
getParsedCommandLine in interface org.jboss.as.cli.CommandContextpublic void printLine(String message)
printLine in interface org.jboss.as.cli.CommandContextpublic void printColumns(Collection<String> col)
printColumns in interface org.jboss.as.cli.CommandContextpublic void clearScreen()
clearScreen in interface org.jboss.as.cli.CommandContextpublic void terminateSession()
terminateSession in interface org.jboss.as.cli.CommandContextpublic boolean isTerminated()
isTerminated in interface org.jboss.as.cli.CommandContextpublic void set(org.jboss.as.cli.CommandContext.Scope scope,
String key,
Object value)
set in interface org.jboss.as.cli.CommandContextpublic Object get(org.jboss.as.cli.CommandContext.Scope scope, String key)
get in interface org.jboss.as.cli.CommandContextpublic void clear(org.jboss.as.cli.CommandContext.Scope scope)
clear in interface org.jboss.as.cli.CommandContextpublic Object remove(org.jboss.as.cli.CommandContext.Scope scope, String key)
remove in interface org.jboss.as.cli.CommandContextpublic org.jboss.as.controller.client.ModelControllerClient getModelControllerClient()
getModelControllerClient in interface org.jboss.as.cli.CommandContextpublic void setModelControllerClient(org.jboss.as.controller.client.ModelControllerClient mcc)
public void connectController()
throws org.jboss.as.cli.CommandLineException
connectController in interface org.jboss.as.cli.CommandContextorg.jboss.as.cli.CommandLineExceptionpublic void connectController(String controller) throws org.jboss.as.cli.CommandLineException
connectController in interface org.jboss.as.cli.CommandContextorg.jboss.as.cli.CommandLineExceptionpublic void connectController(String host, int port) throws org.jboss.as.cli.CommandLineException
connectController in interface org.jboss.as.cli.CommandContextorg.jboss.as.cli.CommandLineExceptionpublic void bindClient(org.jboss.as.controller.client.ModelControllerClient newClient)
bindClient in interface org.jboss.as.cli.CommandContextpublic void disconnectController()
disconnectController in interface org.jboss.as.cli.CommandContextpublic String getDefaultControllerHost()
getDefaultControllerHost in interface org.jboss.as.cli.CommandContextpublic int getDefaultControllerPort()
getDefaultControllerPort in interface org.jboss.as.cli.CommandContextpublic org.jboss.as.cli.ControllerAddress getDefaultControllerAddress()
getDefaultControllerAddress in interface org.jboss.as.cli.CommandContextpublic String getControllerHost()
getControllerHost in interface org.jboss.as.cli.CommandContextpublic int getControllerPort()
getControllerPort in interface org.jboss.as.cli.CommandContextpublic org.jboss.as.cli.operation.CommandLineParser getCommandLineParser()
getCommandLineParser in interface org.jboss.as.cli.CommandContextpublic org.jboss.as.cli.operation.OperationRequestAddress getCurrentNodePath()
getCurrentNodePath in interface org.jboss.as.cli.CommandContextpublic org.jboss.as.cli.operation.NodePathFormatter getNodePathFormatter()
getNodePathFormatter in interface org.jboss.as.cli.CommandContextpublic org.jboss.as.cli.operation.OperationCandidatesProvider getOperationCandidatesProvider()
getOperationCandidatesProvider in interface org.jboss.as.cli.CommandContextpublic org.jboss.as.cli.CommandHistory getHistory()
getHistory in interface org.jboss.as.cli.CommandContextpublic boolean isBatchMode()
isBatchMode in interface org.jboss.as.cli.CommandContextpublic boolean isWorkflowMode()
isWorkflowMode in interface org.jboss.as.cli.CommandContextpublic org.jboss.as.cli.batch.BatchManager getBatchManager()
getBatchManager in interface org.jboss.as.cli.CommandContextpublic org.jboss.as.cli.batch.BatchedCommand toBatchedCommand(String line) throws org.jboss.as.cli.CommandFormatException
toBatchedCommand in interface org.jboss.as.cli.CommandContextorg.jboss.as.cli.CommandFormatExceptionpublic org.jboss.dmr.ModelNode buildRequest(String line) throws org.jboss.as.cli.CommandFormatException
buildRequest in interface org.jboss.as.cli.CommandContextorg.jboss.as.cli.CommandFormatExceptionpublic org.jboss.as.cli.CommandLineCompleter getDefaultCommandCompleter()
getDefaultCommandCompleter in interface org.jboss.as.cli.CommandContextpublic boolean isDomainMode()
isDomainMode in interface org.jboss.as.cli.CommandContextpublic void addEventListener(org.jboss.as.cli.CliEventListener listener)
addEventListener in interface org.jboss.as.cli.CommandContextpublic int getExitCode()
getExitCode in interface org.jboss.as.cli.CommandContextpublic void handle(String line) throws org.jboss.as.cli.CommandLineException
handle in interface org.jboss.as.cli.CommandContextorg.jboss.as.cli.CommandLineExceptionpublic void handleSafe(String line)
handleSafe in interface org.jboss.as.cli.CommandContextpublic void interact()
interact in interface org.jboss.as.cli.CommandContextpublic File getCurrentDir()
getCurrentDir in interface org.jboss.as.cli.CommandContextpublic void setCurrentDir(File dir)
setCurrentDir in interface org.jboss.as.cli.CommandContextpublic boolean isResolveParameterValues()
isResolveParameterValues in interface org.jboss.as.cli.CommandContextpublic void setResolveParameterValues(boolean resolve)
setResolveParameterValues in interface org.jboss.as.cli.CommandContextpublic boolean isSilent()
isSilent in interface org.jboss.as.cli.CommandContextpublic void setSilent(boolean silent)
setSilent in interface org.jboss.as.cli.CommandContextpublic int getTerminalWidth()
getTerminalWidth in interface org.jboss.as.cli.CommandContextpublic int getTerminalHeight()
getTerminalHeight in interface org.jboss.as.cli.CommandContextpublic void setVariable(String name, String value) throws org.jboss.as.cli.CommandLineException
setVariable in interface org.jboss.as.cli.CommandContextorg.jboss.as.cli.CommandLineExceptionpublic String getVariable(String name)
getVariable in interface org.jboss.as.cli.CommandContextpublic Collection<String> getVariables()
getVariables in interface org.jboss.as.cli.CommandContextpublic void registerRedirection(org.jboss.as.cli.CommandLineRedirection redirection)
throws org.jboss.as.cli.CommandLineException
registerRedirection in interface org.jboss.as.cli.CommandContextorg.jboss.as.cli.CommandLineExceptionpublic org.jboss.as.cli.ConnectionInfo getConnectionInfo()
getConnectionInfo in interface org.jboss.as.cli.CommandContextpublic void captureOutput(PrintStream captor)
captureOutput in interface org.jboss.as.cli.CommandContextpublic void releaseOutput()
releaseOutput in interface org.jboss.as.cli.CommandContextpublic void setCommandTimeout(int numSeconds)
setCommandTimeout in interface org.jboss.as.cli.CommandContextpublic int getCommandTimeout()
getCommandTimeout in interface org.jboss.as.cli.CommandContextpublic void resetTimeout(org.jboss.as.cli.CommandContext.TIMEOUT_RESET_VALUE value)
resetTimeout in interface org.jboss.as.cli.CommandContextpublic org.jboss.dmr.ModelNode execute(org.jboss.dmr.ModelNode mn,
String description)
throws org.jboss.as.cli.CommandLineException,
IOException
execute in interface org.jboss.as.cli.CommandContextorg.jboss.as.cli.CommandLineExceptionIOExceptionpublic org.jboss.dmr.ModelNode execute(org.jboss.as.controller.client.Operation op,
String description)
throws org.jboss.as.cli.CommandLineException,
IOException
execute in interface org.jboss.as.cli.CommandContextorg.jboss.as.cli.CommandLineExceptionIOExceptionCopyright © 2019. All rights reserved.