|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsky.common.SkyContext
For each request that the SAF controller servlet, SkyServlet, recieves, it creates a SkyContext object. The SkyContext object is then passed to the SAF based form that will handle the request. SkyContext class contains all the necessary information that a SAF based form may need to process the request:
$RCSfile: SkyContext.java,v $
$Revision: 1.8 $, $Date: 2005/04/24 03:14:01 $
| Field Summary | |
protected javax.servlet.ServletConfig |
_config
Servlet config. |
protected javax.servlet.ServletContext |
_context
Servlet context. |
protected java.lang.String |
_from
Sender's email address for sending emails as specified by user in web.xml file. |
protected java.lang.String |
_mime
HTTP response mime-type. |
protected java.lang.String |
_name
Class name of the form that will handle the HTTP request. |
protected java.io.OutputStream |
_out
HTTP response output stream. |
protected DBPool |
_pool
Handle to database connection pool. |
protected javax.servlet.http.HttpServletRequest |
_request
Servlet request. |
protected javax.servlet.http.HttpServletResponse |
_response
Servlet response. |
protected java.lang.String |
_smtp
STMP server name for sending emails as specified by user in web.xml file. |
protected Tracker |
_t
Tracks user and session activity. |
protected java.io.PrintWriter |
_writer
HTTP response writer. |
static FormattedResourceBundle |
STRINGS
|
| Constructor Summary | |
SkyContext(javax.servlet.ServletConfig config)
Constructor for instantiating SkyContext object. |
|
| Method Summary | |
void |
clear()
Clear all the state information except values of parameters specified in web.xml application descriptor file. |
java.lang.String |
getContentType()
Get the currently set mime-type of the response. |
DatabaseConnector |
getDatabaseConnector(Form form)
Get a database connection from the database connection pool. |
EmailConnector |
getEmailConnector()
Get an email connection |
java.io.OutputStream |
getOutputStream()
Get output stream that can be used to create a response. |
java.io.PrintWriter |
getPrintWriter()
Get print writer that can be used to create a response. |
javax.servlet.ServletConfig |
getServletConfig()
Get servlet config associated with this context. |
javax.servlet.ServletContext |
getServletContext()
Get servlet context assocated with this context |
java.lang.String |
getServletName()
Get the name of the SAF form class that is going to process the HTTP request associated with this context. |
javax.servlet.http.HttpServletRequest |
getServletRequest()
Get servlet request associated with this context. |
javax.servlet.http.HttpServletResponse |
getServletResponse()
Get servlet response associated with this context |
javax.servlet.http.HttpSession |
getServletSession()
Get servlet session associated with this context. |
Tracker |
getTracker()
Get the Tracker object that is being used to track user activies. |
void |
setContentType(java.lang.String type)
Set the mime-type of the response. |
void |
setHttp(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Set HTTP request and response. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String _name
protected javax.servlet.http.HttpServletRequest _request
protected javax.servlet.http.HttpServletResponse _response
protected javax.servlet.ServletContext _context
protected javax.servlet.ServletConfig _config
protected java.io.PrintWriter _writer
protected java.io.OutputStream _out
protected java.lang.String _mime
protected Tracker _t
protected DBPool _pool
protected java.lang.String _smtp
protected java.lang.String _from
public static final FormattedResourceBundle STRINGS
| Constructor Detail |
public SkyContext(javax.servlet.ServletConfig config)
throws ErrorMessage
config - ServletConfig for an HTTP request.
ErrorMessage - if the user did not specify parameters in web.xml properly.| Method Detail |
public void clear()
public void setHttp(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws ErrorMessage
request - HTTP request.response - HTTP response.
ErrorMessage - if an IOException occurs.public javax.servlet.http.HttpServletRequest getServletRequest()
public javax.servlet.http.HttpServletResponse getServletResponse()
public javax.servlet.http.HttpSession getServletSession()
public javax.servlet.ServletContext getServletContext()
public javax.servlet.ServletConfig getServletConfig()
public java.lang.String getServletName()
public Tracker getTracker()
public DatabaseConnector getDatabaseConnector(Form form)
throws Message
Messages - if any messages are produced as a result of this operation.
Messagepublic EmailConnector getEmailConnector()
public java.io.OutputStream getOutputStream()
throws ErrorMessage
ErrorMessage - if there is an IO problem.
public java.io.PrintWriter getPrintWriter()
throws ErrorMessage
ErrorMessage - if there is an IO exception.public void setContentType(java.lang.String type)
public java.lang.String getContentType()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||