Class BaseCommandHandler

  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.integrations.BaseCommandHandler
All Implemented Interfaces:
CommandHandler, NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class BaseCommandHandler
extends GenericService
implements CommandHandler

This class is the implementaion of CommandHandler interface that calls the nextCommandHandler if it is defined, or will executes the Command object passed if it is not..

Field Summary
static java.lang.String CLASS_VERSION
Fields inherited from class atg.nucleus.GenericService
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
Constructor Summary
Method Summary
 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
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static java.lang.String CLASS_VERSION
Constructor Detail


public BaseCommandHandler()
Method Detail


public CommandHandler getNextCommandHandler()
Returns Next Command Handler to invoke in the command invocation chain. If this is set, then it will be called. If it is not, then the Command is executed.

Specified by:
getNextCommandHandler in interface CommandHandler
the NextCommandHandler


public void setNextCommandHandler(CommandHandler pNextCommandHandler)
Sets Next CommandHandler in the command invocation chain to invoke


public CommandResult executeCommand(Command pCommand,
                                    java.lang.Object pInput)
                             throws CommandInvocationException,
Checks to see if 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.

Specified by:
executeCommand in interface CommandHandler
pCommand - the Command to invoke with the given input.
pInput - the input Map to the Command
the CommandResult from invoking nextCommandHandler.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.