Package org.jboss.as.cli.handlers
Class ShutdownHandler
- java.lang.Object
-
- org.jboss.as.cli.handlers.CommandHandlerWithArguments
-
- org.jboss.as.cli.handlers.CommandHandlerWithHelp
-
- org.jboss.as.cli.handlers.BaseOperationCommand
-
- org.jboss.as.cli.handlers.ShutdownHandler
-
- All Implemented Interfaces:
CliEventListener,CommandHandler,OperationCommand
public class ShutdownHandler extends BaseOperationCommand
- Author:
- Alexey Loubyansky
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.as.cli.OperationCommand
OperationCommand.HandledRequest
-
-
Field Summary
-
Fields inherited from class org.jboss.as.cli.handlers.BaseOperationCommand
accessRequirement, headers, params, requiredAddress
-
Fields inherited from class org.jboss.as.cli.handlers.CommandHandlerWithHelp
helpArg
-
-
Constructor Summary
Constructors Constructor Description ShutdownHandler(CommandContext ctx, AtomicReference<EmbeddedProcessLaunch> embeddedServerRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.jboss.dmr.ModelNodebuildRequestWithoutHeaders(CommandContext ctx)protected voiddoHandle(CommandContext ctx)booleanisAvailable(CommandContext ctx)Checks whether the command is available in the current context (e.g. some commands require connection with the controller, some are available only in the batch mode, etc)protected booleanisLocalHost(ModelControllerClient client, String host)protected voidsetBooleanArgument(ParsedCommandLine args, org.jboss.dmr.ModelNode op, ArgumentWithValue arg, String paramName)protected AccessRequirementsetupAccessRequirement(CommandContext ctx)-
Methods inherited from class org.jboss.as.cli.handlers.BaseOperationCommand
addArgument, addHeaders, addRequiredPath, addRequiredPath, buildRequest, buildRequestWOValidation, cliEvent, displayResponseHeaders, getAttachments, getRequiredAddress, getRequiredType, handleAttachedFile, handleResponse, handleResponse, isAddressValid, isDependsOnProfile, setParams
-
Methods inherited from class org.jboss.as.cli.handlers.CommandHandlerWithHelp
displayHelp, handle, isBatchMode, printHelp, printList
-
Methods inherited from class org.jboss.as.cli.handlers.CommandHandlerWithArguments
getArgument, getArguments, getArgumentsMap, hasArgument, hasArgument, recognizeArguments
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.as.cli.CommandHandler
getArgument, getArguments, handle, hasArgument, hasArgument, isBatchMode
-
Methods inherited from interface org.jboss.as.cli.OperationCommand
buildHandledRequest, buildRequest
-
-
-
-
Constructor Detail
-
ShutdownHandler
public ShutdownHandler(CommandContext ctx, AtomicReference<EmbeddedProcessLaunch> embeddedServerRef)
-
-
Method Detail
-
setupAccessRequirement
protected AccessRequirement setupAccessRequirement(CommandContext ctx)
- Overrides:
setupAccessRequirementin classBaseOperationCommand
-
isAvailable
public boolean isAvailable(CommandContext ctx)
Description copied from interface:CommandHandlerChecks whether the command is available in the current context (e.g. some commands require connection with the controller, some are available only in the batch mode, etc)- Specified by:
isAvailablein interfaceCommandHandler- Overrides:
isAvailablein classBaseOperationCommand- Parameters:
ctx- current context- Returns:
- true if the command can be executed in the current context, false - otherwise.
-
doHandle
protected void doHandle(CommandContext ctx) throws CommandLineException
- Overrides:
doHandlein classBaseOperationCommand- Throws:
CommandLineException
-
buildRequestWithoutHeaders
protected org.jboss.dmr.ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException
- Specified by:
buildRequestWithoutHeadersin classBaseOperationCommand- Throws:
CommandFormatException
-
isLocalHost
protected boolean isLocalHost(ModelControllerClient client, String host) throws CommandLineException
- Throws:
CommandLineException
-
setBooleanArgument
protected void setBooleanArgument(ParsedCommandLine args, org.jboss.dmr.ModelNode op, ArgumentWithValue arg, String paramName) throws CommandFormatException
- Throws:
CommandFormatException
-
-