org.apache.empire.struts2.websample.web
Class SampleRequest

java.lang.Object
  extended by org.apache.empire.struts2.websample.web.SampleRequest
All Implemented Interfaces:
WebRequest

public class SampleRequest
extends java.lang.Object
implements WebRequest


Field Summary
protected static org.apache.commons.logging.Log log
           
 
Fields inherited from interface org.apache.empire.struts2.web.WebRequest
REQUEST_NAME
 
Constructor Summary
SampleRequest()
           
 
Method Summary
 void exit(int exitCode)
          This function is called from the EmpireStrutsDispatcher when a request ends if an action was accociated with the request and the action implements the Disposible interface then the exit code returned by Disposible.dispose() is passed with the exitCode parameter You might use the exitCode e.g.
 SampleApplication getApplication()
           
 java.sql.Connection getConnection()
           
 javax.servlet.http.HttpServletRequest getHttpRequest()
          returns the current HttpRequestObject
 javax.servlet.http.HttpServletResponse getHttpResponse()
          returns the current HttpResponseObject
static SampleRequest getInstance()
           
 SampleSession getSession()
           
 boolean init(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object session)
          Initializes the request object This method is called from the EmpiretrutsDispatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
Constructor Detail

SampleRequest

public SampleRequest()
Method Detail

getInstance

public static SampleRequest getInstance()

init

public boolean init(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response,
                    java.lang.Object session)
Description copied from interface: WebRequest
Initializes the request object This method is called from the EmpiretrutsDispatcher

Specified by:
init in interface WebRequest
Parameters:
request - the HttpServletRequest
response - the HttpServletResponse
session - the sessionObject
Returns:
true if the request should continue processing or false otherwise

exit

public void exit(int exitCode)
Description copied from interface: WebRequest
This function is called from the EmpireStrutsDispatcher when a request ends if an action was accociated with the request and the action implements the Disposible interface then the exit code returned by Disposible.dispose() is passed with the exitCode parameter You might use the exitCode e.g. to commit or rollback a transaction on the JDBC-Connection

Specified by:
exit in interface WebRequest

getSession

public SampleSession getSession()

getApplication

public SampleApplication getApplication()

getConnection

public java.sql.Connection getConnection()

getHttpRequest

public javax.servlet.http.HttpServletRequest getHttpRequest()
Description copied from interface: WebRequest
returns the current HttpRequestObject

Specified by:
getHttpRequest in interface WebRequest
Returns:
the httpServletRequest

getHttpResponse

public javax.servlet.http.HttpServletResponse getHttpResponse()
Description copied from interface: WebRequest
returns the current HttpResponseObject

Specified by:
getHttpResponse in interface WebRequest
Returns:
the httpServletResponse


Copyright © 2008-2009 Apache Software Foundation. All Rights Reserved.