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.CommandContext
public String getArgumentsString()
getArgumentsString
in interface org.jboss.as.cli.CommandContext
public org.jboss.as.cli.operation.ParsedCommandLine getParsedCommandLine()
getParsedCommandLine
in interface org.jboss.as.cli.CommandContext
public void printLine(String message)
printLine
in interface org.jboss.as.cli.CommandContext
public void printColumns(Collection<String> col)
printColumns
in interface org.jboss.as.cli.CommandContext
public void clearScreen()
clearScreen
in interface org.jboss.as.cli.CommandContext
public void terminateSession()
terminateSession
in interface org.jboss.as.cli.CommandContext
public boolean isTerminated()
isTerminated
in interface org.jboss.as.cli.CommandContext
public void set(org.jboss.as.cli.CommandContext.Scope scope, String key, Object value)
set
in interface org.jboss.as.cli.CommandContext
public Object get(org.jboss.as.cli.CommandContext.Scope scope, String key)
get
in interface org.jboss.as.cli.CommandContext
public void clear(org.jboss.as.cli.CommandContext.Scope scope)
clear
in interface org.jboss.as.cli.CommandContext
public Object remove(org.jboss.as.cli.CommandContext.Scope scope, String key)
remove
in interface org.jboss.as.cli.CommandContext
public org.jboss.as.controller.client.ModelControllerClient getModelControllerClient()
getModelControllerClient
in interface org.jboss.as.cli.CommandContext
public 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.CommandContext
org.jboss.as.cli.CommandLineException
public void connectController(String controller) throws org.jboss.as.cli.CommandLineException
connectController
in interface org.jboss.as.cli.CommandContext
org.jboss.as.cli.CommandLineException
public void connectController(String host, int port) throws org.jboss.as.cli.CommandLineException
connectController
in interface org.jboss.as.cli.CommandContext
org.jboss.as.cli.CommandLineException
public void bindClient(org.jboss.as.controller.client.ModelControllerClient newClient)
bindClient
in interface org.jboss.as.cli.CommandContext
public void disconnectController()
disconnectController
in interface org.jboss.as.cli.CommandContext
public String getDefaultControllerHost()
getDefaultControllerHost
in interface org.jboss.as.cli.CommandContext
public int getDefaultControllerPort()
getDefaultControllerPort
in interface org.jboss.as.cli.CommandContext
public org.jboss.as.cli.ControllerAddress getDefaultControllerAddress()
getDefaultControllerAddress
in interface org.jboss.as.cli.CommandContext
public String getControllerHost()
getControllerHost
in interface org.jboss.as.cli.CommandContext
public int getControllerPort()
getControllerPort
in interface org.jboss.as.cli.CommandContext
public org.jboss.as.cli.operation.CommandLineParser getCommandLineParser()
getCommandLineParser
in interface org.jboss.as.cli.CommandContext
public org.jboss.as.cli.operation.OperationRequestAddress getCurrentNodePath()
getCurrentNodePath
in interface org.jboss.as.cli.CommandContext
public org.jboss.as.cli.operation.NodePathFormatter getNodePathFormatter()
getNodePathFormatter
in interface org.jboss.as.cli.CommandContext
public org.jboss.as.cli.operation.OperationCandidatesProvider getOperationCandidatesProvider()
getOperationCandidatesProvider
in interface org.jboss.as.cli.CommandContext
public org.jboss.as.cli.CommandHistory getHistory()
getHistory
in interface org.jboss.as.cli.CommandContext
public boolean isBatchMode()
isBatchMode
in interface org.jboss.as.cli.CommandContext
public boolean isWorkflowMode()
isWorkflowMode
in interface org.jboss.as.cli.CommandContext
public org.jboss.as.cli.batch.BatchManager getBatchManager()
getBatchManager
in interface org.jboss.as.cli.CommandContext
public org.jboss.as.cli.batch.BatchedCommand toBatchedCommand(String line) throws org.jboss.as.cli.CommandFormatException
toBatchedCommand
in interface org.jboss.as.cli.CommandContext
org.jboss.as.cli.CommandFormatException
public org.jboss.dmr.ModelNode buildRequest(String line) throws org.jboss.as.cli.CommandFormatException
buildRequest
in interface org.jboss.as.cli.CommandContext
org.jboss.as.cli.CommandFormatException
public org.jboss.as.cli.CommandLineCompleter getDefaultCommandCompleter()
getDefaultCommandCompleter
in interface org.jboss.as.cli.CommandContext
public boolean isDomainMode()
isDomainMode
in interface org.jboss.as.cli.CommandContext
public void addEventListener(org.jboss.as.cli.CliEventListener listener)
addEventListener
in interface org.jboss.as.cli.CommandContext
public int getExitCode()
getExitCode
in interface org.jboss.as.cli.CommandContext
public void handle(String line) throws org.jboss.as.cli.CommandLineException
handle
in interface org.jboss.as.cli.CommandContext
org.jboss.as.cli.CommandLineException
public void handleSafe(String line)
handleSafe
in interface org.jboss.as.cli.CommandContext
public void interact()
interact
in interface org.jboss.as.cli.CommandContext
public File getCurrentDir()
getCurrentDir
in interface org.jboss.as.cli.CommandContext
public void setCurrentDir(File dir)
setCurrentDir
in interface org.jboss.as.cli.CommandContext
public boolean isResolveParameterValues()
isResolveParameterValues
in interface org.jboss.as.cli.CommandContext
public void setResolveParameterValues(boolean resolve)
setResolveParameterValues
in interface org.jboss.as.cli.CommandContext
public boolean isSilent()
isSilent
in interface org.jboss.as.cli.CommandContext
public void setSilent(boolean silent)
setSilent
in interface org.jboss.as.cli.CommandContext
public int getTerminalWidth()
getTerminalWidth
in interface org.jboss.as.cli.CommandContext
public int getTerminalHeight()
getTerminalHeight
in interface org.jboss.as.cli.CommandContext
public void setVariable(String name, String value) throws org.jboss.as.cli.CommandLineException
setVariable
in interface org.jboss.as.cli.CommandContext
org.jboss.as.cli.CommandLineException
public String getVariable(String name)
getVariable
in interface org.jboss.as.cli.CommandContext
public Collection<String> getVariables()
getVariables
in interface org.jboss.as.cli.CommandContext
public void registerRedirection(org.jboss.as.cli.CommandLineRedirection redirection) throws org.jboss.as.cli.CommandLineException
registerRedirection
in interface org.jboss.as.cli.CommandContext
org.jboss.as.cli.CommandLineException
public org.jboss.as.cli.ConnectionInfo getConnectionInfo()
getConnectionInfo
in interface org.jboss.as.cli.CommandContext
public void captureOutput(PrintStream captor)
captureOutput
in interface org.jboss.as.cli.CommandContext
public void releaseOutput()
releaseOutput
in interface org.jboss.as.cli.CommandContext
public void setCommandTimeout(int numSeconds)
setCommandTimeout
in interface org.jboss.as.cli.CommandContext
public int getCommandTimeout()
getCommandTimeout
in interface org.jboss.as.cli.CommandContext
public void resetTimeout(org.jboss.as.cli.CommandContext.TIMEOUT_RESET_VALUE value)
resetTimeout
in interface org.jboss.as.cli.CommandContext
public 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.CommandContext
org.jboss.as.cli.CommandLineException
IOException
public 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.CommandContext
org.jboss.as.cli.CommandLineException
IOException
Copyright © 2019. All rights reserved.