| java.lang.Object nextapp.echo2.webrender.Connection
Connection | public class Connection (Code) | | A representation of a connection to the server by the client, encapsulating
the servlet request and response objects, and providing access to the
relevant application instance.
Connection s also manage the life-cycle of
UserInstance s within the HttpSession .
|
Connection | Connection(WebRenderServlet servlet, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code) | | Creates a connection object that will handle the given
request and response. The UserInstance will be acquired from the session
if one exists. A session will NOT be created if one does not exist.
Parameters: servlet - the WebRenderServlet generating the connection Parameters: request - the HTTP request object that was passed to the servlet Parameters: response - the HTTP response object that was passed to the servlet |
disposeUserInstance | void disposeUserInstance()(Code) | | Disposes of the UserInstance associated with this
Connection .
|
getOutputStream | public OutputStream getOutputStream()(Code) | | Returns the OutputStream object that may be used to
generate a response. This method may be called once. If it is called,
the getPrintWriter() method may not be called. This method wraps a
call to HttpServletResponse.getOutputStream() . The
OutputStream will be closed by the servlet container.
the OutputStream object that may be used to generate a response to the client |
getProperty | public Object getProperty(String key)(Code) | | Returns a property from the Connection -persistent
property map. (Properties are disposed of when Connection
has completed).
Parameters: key - the property key (for namespacing purposes, keys should be prefaced with the full class name of the object setting theproperty) the property value |
getRequest | public HttpServletRequest getRequest()(Code) | | Returns the HttpServletRequest wrapped by this
Connection .
the HttpServletRequest wrapped by this Connection |
getResponse | public HttpServletResponse getResponse()(Code) | | Returns the HttpServletResponse wrapped by this
Connection .
the HttpServletResponse wrapped by this Connection |
getServlet | public WebRenderServlet getServlet()(Code) | | Returns the WebRenderServlet wrapped by this
Connection .
the WebRenderServlet wrapped by this Connection |
getUserInstance | public UserInstance getUserInstance()(Code) | | Returns the UserInstance associated with
this connection. If the session has not been initialized, null is
returned.
the UserInstance associated with this connection |
getWriter | public PrintWriter getWriter()(Code) | | Returns the PrintWriter object that may be used to
generate a response. This method may be called once. If it is called,
the getOuputStream() method may not be called. This method wraps a
call to HttpServletResponse.getWriter() . The
PrintWriter will be closed by the servlet container.
the PrintWriter object that may be used to generate a response to the client |
initUserInstance | void initUserInstance(UserInstance userInstance)(Code) | | Initializes the state of a new UserInstance and associates
it with this Connection and the underlying
HttpSession
Parameters: userInstance - the UserInstance |
setContentType | public void setContentType(ContentType contentType)(Code) | | Sets the content type of the response.
This method will automatically append a character encoding to
non-binary content types.
Parameters: contentType - the content type of the response |
setProperty | public void setProperty(String key, Object value)(Code) | | Sets a property inthe Connection -persistent
property map. (Properties are disposed of when Connection
has completed).
Parameters: key - the property key (for namespacing purposes, keys should be prefaced with the full class name of the object setting theproperty) Parameters: value - the new property value |
|
|