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.Stringdebug(java.lang.String message)protected java.lang.Stringerror(java.lang.String message)protected CommandResultfailed(java.lang.String message)protected CommandResultfailed(java.lang.String message, java.lang.Throwable throwable)protected CommandResultfailed(java.lang.Throwable throwable)CommandRegistrygetCommandRegistry()DaemonServicegetService()protected java.lang.Stringinfo(java.lang.String message)booleanisIsolated()Returns whether it is a command that must be guaranteed not to be executed at the same time as another command.protected CommandResultsuccess(java.lang.String message)protected java.lang.Stringwarn(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:CommandReturns whether it is a command that must be guaranteed not to be executed at the same time as another command.- Specified by:
isIsolatedin 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)
-
-