org.pentaho.platform.engine.services
Class BaseRequestHandler

java.lang.Object
  extended by org.pentaho.platform.engine.services.BaseRequestHandler
All Implemented Interfaces:
IActionCompleteListener, IActionRequestHandler
Direct Known Subclasses:
HttpServletRequestHandler, HttpWebServiceRequestHandler

public class BaseRequestHandler
extends Object
implements IActionRequestHandler, IActionCompleteListener


Field Summary
static int ON_TIMEOUT_CANCEL
           
static int ON_TIMEOUT_RETURN
           
 
Constructor Summary
BaseRequestHandler(IPentahoSession session, String instanceId, IOutputHandler outputHandler, IParameterProvider parameterProvider, IPentahoUrlFactory urlFactory)
           
 
Method Summary
 void actionComplete(IRuntimeContext completedRuntime)
          Invoked when a Component execution has completed
 void dispose()
           
 String getActionName()
           
 String getActionPath()
           
 String getInstanceId()
           
 List getMessages()
          As the execution happens, the action handler is responsible for storing a list of all the messages that occur in the case of component failure.
 IOutputHandler getOutputHandler()
           
 HashMap getParameterProviders()
           
 IRuntimeContext getRuntime(String requestHandle)
          Gets the runtime.
 String getSolutionName()
           
 IRuntimeContext handleActionAsyncRequest()
          Executes an action sequence asynchronously.
 IRuntimeContext handleActionRequest(int timeout, int timeoutType)
          Responsible for executing the action using the solution engine.
 void setAction(String actionPath, String actionName)
           
 void setActionPath(String actionPath)
           
 void setCreateFeedbackParameterCallback(ICreateFeedbackParameterCallback createFeedbackParameterCallback)
           
 void setForcePrompt(boolean forcePrompt)
          Sets whether to force the generation of a prompt page
 void setInstanceEnds(boolean instanceEnds)
           
 void setInstanceId(String instanceId)
           
 void setOutputHandler(IOutputHandler outputHandler)
           
 void setParameterProvider(String name, IParameterProvider parameterProvider)
           
 void setParameterXsl(String xsl)
           
 void setProcessId(String processId)
           
 void setSolutionName(String solutionName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ON_TIMEOUT_CANCEL

public static final int ON_TIMEOUT_CANCEL
See Also:
Constant Field Values

ON_TIMEOUT_RETURN

public static final int ON_TIMEOUT_RETURN
See Also:
Constant Field Values
Constructor Detail

BaseRequestHandler

public BaseRequestHandler(IPentahoSession session,
                          String instanceId,
                          IOutputHandler outputHandler,
                          IParameterProvider parameterProvider,
                          IPentahoUrlFactory urlFactory)
Method Detail

getMessages

public List getMessages()
Description copied from interface: IActionRequestHandler
As the execution happens, the action handler is responsible for storing a list of all the messages that occur in the case of component failure. This method returns that list. The items in the list are presented to the user as execution feedback.

Specified by:
getMessages in interface IActionRequestHandler
Returns:
list of messages

setInstanceEnds

public void setInstanceEnds(boolean instanceEnds)

setParameterProvider

public void setParameterProvider(String name,
                                 IParameterProvider parameterProvider)

getParameterProviders

public HashMap getParameterProviders()

setOutputHandler

public void setOutputHandler(IOutputHandler outputHandler)

setProcessId

public void setProcessId(String processId)

setInstanceId

public void setInstanceId(String instanceId)

getInstanceId

public String getInstanceId()

setAction

public void setAction(String actionPath,
                      String actionName)

setSolutionName

public void setSolutionName(String solutionName)

getSolutionName

public String getSolutionName()

handleActionRequest

public IRuntimeContext handleActionRequest(int timeout,
                                           int timeoutType)
Description copied from interface: IActionRequestHandler
Responsible for executing the action using the solution engine.

Specified by:
handleActionRequest in interface IActionRequestHandler
Parameters:
timeout - Timeout for the execution - currently ignored in the Base
timeoutType - - currently ignored in the Base
Returns:
RuntimeContext from the execution
See Also:
BaseRequestHandler

dispose

public void dispose()

handleActionAsyncRequest

public IRuntimeContext handleActionAsyncRequest()
Description copied from interface: IActionRequestHandler
Executes an action sequence asynchronously. Note - this is currently not implemented in the BaseRequestHandler

Specified by:
handleActionAsyncRequest in interface IActionRequestHandler
Returns:
RuntimeContext created for the asynchronous execution.

getRuntime

public IRuntimeContext getRuntime(String requestHandle)
Description copied from interface: IActionRequestHandler
Gets the runtime. Currently not called anywhere in the platform

Specified by:
getRuntime in interface IActionRequestHandler
Returns:
the RuntimeContext for the execution

actionComplete

public void actionComplete(IRuntimeContext completedRuntime)
Description copied from interface: IActionCompleteListener
Invoked when a Component execution has completed

Specified by:
actionComplete in interface IActionCompleteListener
Parameters:
completedRuntime - the runtime context associated with this action

getOutputHandler

public IOutputHandler getOutputHandler()

setForcePrompt

public void setForcePrompt(boolean forcePrompt)
Description copied from interface: IActionRequestHandler
Sets whether to force the generation of a prompt page

Specified by:
setForcePrompt in interface IActionRequestHandler

setParameterXsl

public void setParameterXsl(String xsl)

getActionName

public String getActionName()

getActionPath

public String getActionPath()

setActionPath

public void setActionPath(String actionPath)

setCreateFeedbackParameterCallback

public void setCreateFeedbackParameterCallback(ICreateFeedbackParameterCallback createFeedbackParameterCallback)
Specified by:
setCreateFeedbackParameterCallback in interface IActionRequestHandler