atg.droplet
Class Invoke

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.droplet.Invoke
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class Invoke
extends DynamoServlet

The Invoke servlet invokes a named method for a particular object and arguements. Any results are returned through the return parameter. See the documentation on java.lang.reflect.Method for more details.

It takes as parameters: INPUT PARAMS

object
The instance object to invoke the method.
method
The method to invoke. Must be either an instance of java.lang.reflect.Method or the name of a public method declared in the value object as a String. The java.lang.Class.getMethod() method is used to find the named method.
args
An array of arguments to method. If null then the method assumes it takes no arguments. If the value is of type Object the method assumes it takes a single argument. If the value if an array of Objects the method assumes it takes these Object as arguments.
OUTPUT PARAMS
return
The object returned when invoking the method or null if the method is of return type void.
throwable
The exception that was thrown when the method was executed or null if no exception was thrown.
OPARAMS
output
Serviced if there were no errors.
catch
Serviced if errors occurred during the method call. The throwable parameter is set to the exception that was thrown.
finally
Always serviced after the method call. The throwable parameter is set to the exception thrown.


Field Summary
static java.lang.String ARGS
           
static java.lang.String CATCH
           
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String FINALLY
           
static java.lang.String METHOD
           
static java.lang.String OBJECT
           
static java.lang.String OUTPUT
           
static java.lang.String RETURN
           
static java.lang.String THROWABLE
           
 
Fields inherited from class atg.servlet.DynamoServlet
mAllowCleanupRequest, mParameters
 
Fields inherited from class atg.nucleus.servlet.ServletService
SERVLET_INFO_KEY
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
Invoke()
          Constructs an instanceof Invoke
 
Method Summary
 void service(DynamoHttpServletRequest request, DynamoHttpServletResponse response)
          Service thre request
protected  void serviceCatch(DynamoHttpServletRequest request, DynamoHttpServletResponse response, java.lang.Throwable exception)
          Services the CATCH oparam if there's an exception
protected  void serviceFinally(DynamoHttpServletRequest request, DynamoHttpServletResponse response)
          Services the FINALLY oparam if there's an exception
protected  void serviceInvoke(DynamoHttpServletRequest request, DynamoHttpServletResponse response, java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] args)
          Handles the Invoke call
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, init, setServletInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
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, reResolveThis, 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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


OBJECT

public static final java.lang.String OBJECT
See Also:
Constant Field Values

METHOD

public static final java.lang.String METHOD
See Also:
Constant Field Values

ARGS

public static final java.lang.String ARGS
See Also:
Constant Field Values

RETURN

public static final java.lang.String RETURN
See Also:
Constant Field Values

THROWABLE

public static final java.lang.String THROWABLE
See Also:
Constant Field Values

OUTPUT

public static final java.lang.String OUTPUT
See Also:
Constant Field Values

CATCH

public static final java.lang.String CATCH
See Also:
Constant Field Values

FINALLY

public static final java.lang.String FINALLY
See Also:
Constant Field Values
Constructor Detail

Invoke

public Invoke()
Constructs an instanceof Invoke

Method Detail

service

public void service(DynamoHttpServletRequest request,
                    DynamoHttpServletResponse response)
             throws javax.servlet.ServletException,
                    java.io.IOException
Service thre request

Overrides:
service in class DynamoServlet
Parameters:
request - the request to be processed
response - the response object for this request
Throws:
javax.servlet.ServletException - an application specific error occurred processing this request
java.io.IOException - an error occurred reading data from the request or writing data to the response.

serviceCatch

protected void serviceCatch(DynamoHttpServletRequest request,
                            DynamoHttpServletResponse response,
                            java.lang.Throwable exception)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Services the CATCH oparam if there's an exception

Throws:
javax.servlet.ServletException
java.io.IOException

serviceFinally

protected void serviceFinally(DynamoHttpServletRequest request,
                              DynamoHttpServletResponse response)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Services the FINALLY oparam if there's an exception

Throws:
javax.servlet.ServletException
java.io.IOException

serviceInvoke

protected void serviceInvoke(DynamoHttpServletRequest request,
                             DynamoHttpServletResponse response,
                             java.lang.Object obj,
                             java.lang.reflect.Method method,
                             java.lang.Object[] args)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Handles the Invoke call

Throws:
javax.servlet.ServletException
java.io.IOException