public abstract class BaseCommand extends GenericService implements Command
invokeRPC(Object).| 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 | 
|---|
BaseCommand()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
doStartService()
This is called after a Service has been created, placed into the
 naming hierarchy, and initialized with its configured property
 values. 
 | 
CommandResult | 
execute(java.lang.Object pInput)
Application code should call this method to execute a RPC call 
 This method will check to see if there is a CommandHandler configured
 on this component and if so, will call the  
executeCommand()
 on that particular CommandHandler. | 
CommandHandler | 
getCommandHandler()
The CommandHandler that will be called by this RPC Client to handle
 the execution of a Command. 
 | 
java.util.Map | 
getContext()
Contextual information that can be passed. 
 | 
abstract CommandResult | 
invokeRPC(java.lang.Object pInput)
Abstract method. 
 | 
void | 
setCommandHandler(CommandHandler pCommandHandler)
Set the CommandHandler property. 
 | 
void | 
setContext(java.util.Map pContext)
Set the Conext property. 
 | 
addLogListener, createAdminServlet, 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, stopService, toStringvlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic CommandHandler getCommandHandler()
execute() is called on
 this component it checks this property for a configured CommandHandler.getCommandHandler in interface Commandpublic void setCommandHandler(CommandHandler pCommandHandler)
pCommandHandler - public java.util.Map getContext()
getContext in interface Commandpublic void setContext(java.util.Map pContext)
pContext - public void doStartService()
                    throws ServiceException
GenericServicedoStartService in class GenericServiceServiceException - if the Service had a problem starting uppublic CommandResult execute(java.lang.Object pInput) throws CommandInvocationException, CommandTimeoutException, InvalidInputException
executeCommand()
 on that particular CommandHandler.
 If no CommandHandler is configured then the 
 invokeRPC(Object) method is called.
 This method has PerformanceMonitor code associated with it. If the PerformanceMonitor is enabled, this method will generate statistics on how long it takes to execute the Command.
execute in interface CommandpInput - input object to pass to the commandCommandInvocationException - if an error occursCommandTimeoutException - if time expires for the command.InvalidInputException - if input object passed is invalid.public abstract CommandResult invokeRPC(java.lang.Object pInput) throws CommandInvocationException, CommandTimeoutException, InvalidInputException
invokeRPC in interface CommandpInput - objectCommandInvocationException - if an error occursCommandTimeoutException - if time expires for the command.InvalidInputException - if input object passed is invalid.