Package com.aspectran.daemon.command
Class AbstractCommand
- java.lang.Object
-
- com.aspectran.daemon.command.AbstractCommand
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
ComponentCommand
,InvokeActionCommand
,JettyCommand
,PollingIntervalCommand
,QuitCommand
,RestartCommand
,TransletCommand
,UndertowCommand
public abstract class AbstractCommand extends java.lang.Object implements Command
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.aspectran.daemon.command.Command
Command.Descriptor
-
-
Constructor Summary
Constructors Constructor Description AbstractCommand(CommandRegistry registry)
AbstractCommand(CommandRegistry registry, boolean isolated)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
debug(java.lang.String message)
protected java.lang.String
error(java.lang.String message)
protected CommandResult
failed(java.lang.String message)
protected CommandResult
failed(java.lang.String message, java.lang.Throwable throwable)
protected CommandResult
failed(java.lang.Throwable throwable)
CommandRegistry
getCommandRegistry()
DaemonService
getService()
protected java.lang.String
info(java.lang.String message)
boolean
isIsolated()
Returns whether it is a command that must be guaranteed not to be executed at the same time as another command.protected CommandResult
success(java.lang.String message)
protected java.lang.String
warn(java.lang.String message)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.aspectran.daemon.command.Command
execute, getDescriptor
-
-
-
-
Constructor Detail
-
AbstractCommand
public AbstractCommand(CommandRegistry registry)
-
AbstractCommand
public AbstractCommand(CommandRegistry registry, boolean isolated)
-
-
Method Detail
-
getCommandRegistry
public CommandRegistry getCommandRegistry()
-
isIsolated
public boolean isIsolated()
Description copied from interface:Command
Returns whether it is a command that must be guaranteed not to be executed at the same time as another command.- Specified by:
isIsolated
in interfaceCommand
- Returns:
- true if the command should ensure that it is not executed at the same time as another command; false otherwise
-
getService
public DaemonService getService()
-
debug
protected java.lang.String debug(java.lang.String message)
-
info
protected java.lang.String info(java.lang.String message)
-
warn
protected java.lang.String warn(java.lang.String message)
-
error
protected java.lang.String error(java.lang.String message)
-
success
protected CommandResult success(java.lang.String message)
-
failed
protected CommandResult failed(java.lang.String message)
-
failed
protected CommandResult failed(java.lang.String message, java.lang.Throwable throwable)
-
failed
protected CommandResult failed(java.lang.Throwable throwable)
-
-