public class BaseCommandHandler extends GenericService implements CommandHandler
CommandHandler interface
that calls the nextCommandHandler if it is defined, or will
executes the Command object passed if it is not..| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
BaseCommandHandler() |
| Modifier and Type | Method and Description |
|---|---|
CommandResult |
executeCommand(Command pCommand,
java.lang.Object pInput)
Checks to see if
nextCommandHandler is set. |
CommandHandler |
getNextCommandHandler()
Returns Next Command Handler to invoke in the command invocation chain.
|
void |
setNextCommandHandler(CommandHandler pNextCommandHandler)
Sets Next CommandHandler in the command invocation chain to invoke
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic CommandHandler getNextCommandHandler()
getNextCommandHandler in interface CommandHandlerpublic void setNextCommandHandler(CommandHandler pNextCommandHandler)
public CommandResult executeCommand(Command pCommand, java.lang.Object pInput) throws CommandInvocationException, CommandTimeoutException, InvalidInputException
nextCommandHandler is set. If it
is, then nextCommandHandler.executeCommand() is
called. If it is not, then this method will call the execute
method on the command. In either case, pInput is the input to the
method, and a CommandResult is returned.executeCommand in interface CommandHandlerpCommand - the Command to invoke with the given input.pInput - the input Map to the CommandnextCommandHandler.executeCommand()
or Command.execute()CommandInvocationException - if any error occurs or exception is
thrown while executing the Command.CommandTimeoutException - if timeout occurs while invoking the command.InvalidInputException - if input object passed is invalid.