CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

com.tangosol.coherence.servlet
Interface SessionHelper.Factory

Enclosing class:
SessionHelper

public static interface SessionHelper.Factory

This interface is used by the SessionHelper to obtain objects that implement various important parts of the Servlet specification, and by doing so, can be placed in front of the application in lieu of the application server's own objects, thus changing the "apparent implementation" of the application server itself (e.g. adding clustering.)

An implementation of the Factory is located dynamically by the SessionHelper based on the version of the Servlet specification that it determines it can support at runtime. The Factory can be explicitly specified as well, by setting it in the initial parameters of the ServletContext, which are placed in the XML deployment descriptor for the web application.

Version:
Coherence 2.3
Author:
cp 2003.07.21

Method Summary
 FilterConfig instantiateFilterConfig(FilterConfig cfg)
          Given an application server's FilterConfig object, create a wrapper.
 HttpServletRequest instantiateHttpServletRequest(HttpRequestContext ctx, HttpServletRequest req)
          Create an HttpServletRequest wrapper.
 HttpServletResponse instantiateHttpServletResponse(HttpRequestContext ctx, HttpServletResponse resp)
          Create an HttpServletResponse wrapper.
 HttpSession instantiateHttpSession(HttpSessionCollection collection)
          Create a new HttpSession object.
 HttpSession instantiateHttpSession(HttpSessionCollection collection, String sId)
          Create an HttpSession object for an existing session ID.
 HttpSessionContext instantiateHttpSessionContext()
          Create an HttpSessionContext implementation.
 RequestDispatcher instantiateRequestDispatcher(RequestDispatcher disp)
          Create a RequestDispatcher wrapper.
 ServletConfig instantiateServletConfig(ServletConfig cfg)
          Given an application server's ServletConfig object, create a wrapper.
 ServletContext instantiateServletContext()
          Create a ServletContext wrapper implementation.
 ServletRequest instantiateServletRequest(RequestContext ctx, ServletRequest req)
          Create an ServletRequest wrapper.
 ServletResponse instantiateServletResponse(RequestContext ctx, ServletResponse resp)
          Create an ServletResponse wrapper.
 SessionHelper instantiateSessionHelper(ServletContext ctx)
          Given an application server's ServletContext object, initialize the factory and create the SessionHelper object.
 

Method Detail

instantiateSessionHelper

SessionHelper instantiateSessionHelper(ServletContext ctx)
Given an application server's ServletContext object, initialize the factory and create the SessionHelper object. This is the bootstrap, and will be called exactly once.

Parameters:
ctx - an application server ServletContext object
Returns:
the SessionHelper object that the factory will work for

instantiateServletContext

ServletContext instantiateServletContext()
Create a ServletContext wrapper implementation.

Returns:
a ServletContext object to provide to the application

instantiateHttpSessionContext

HttpSessionContext instantiateHttpSessionContext()
Create an HttpSessionContext implementation.

Returns:
an HttpSessionContext object to provide to the application

instantiateFilterConfig

FilterConfig instantiateFilterConfig(FilterConfig cfg)
Given an application server's FilterConfig object, create a wrapper.

Parameters:
cfg - an application server FilterConfig object
Returns:
the FilterConfig object to provide to the application

instantiateServletConfig

ServletConfig instantiateServletConfig(ServletConfig cfg)
Given an application server's ServletConfig object, create a wrapper.

Parameters:
cfg - an application server ServletConfig object
Returns:
the ServletConfig object to provide to the application

instantiateServletRequest

ServletRequest instantiateServletRequest(RequestContext ctx,
                                         ServletRequest req)
Create an ServletRequest wrapper.

Parameters:
ctx - the request context
req - the request object from the container
Returns:
an ServletRequest object to provide to the application

instantiateServletResponse

ServletResponse instantiateServletResponse(RequestContext ctx,
                                           ServletResponse resp)
Create an ServletResponse wrapper.

Parameters:
ctx - the request context
resp - the response object from the container
Returns:
an ServletResponse object to provide to the application

instantiateHttpServletRequest

HttpServletRequest instantiateHttpServletRequest(HttpRequestContext ctx,
                                                 HttpServletRequest req)
Create an HttpServletRequest wrapper.

Parameters:
ctx - the HTTP request context
req - the HTTP request object from the container
Returns:
an HttpServletRequest object to provide to the application

instantiateHttpServletResponse

HttpServletResponse instantiateHttpServletResponse(HttpRequestContext ctx,
                                                   HttpServletResponse resp)
Create an HttpServletResponse wrapper.

Parameters:
ctx - the HTTP request context
resp - the HTTP response object from the container
Returns:
an HttpServletResponse object to provide to the application

instantiateHttpSession

HttpSession instantiateHttpSession(HttpSessionCollection collection)
Create a new HttpSession object.

Parameters:
collection - the HttpSessionCollection that manages the session models
Returns:
an HttpSession object

instantiateHttpSession

HttpSession instantiateHttpSession(HttpSessionCollection collection,
                                   String sId)
Create an HttpSession object for an existing session ID.

Parameters:
collection - the HttpSessionCollection that manages the session models
sId - the session ID
Returns:
an HttpSession object

instantiateRequestDispatcher

RequestDispatcher instantiateRequestDispatcher(RequestDispatcher disp)
Create a RequestDispatcher wrapper.

Parameters:
disp - the request dispatcher object from the container
Returns:
a RequestDispatcher object to provide to the application

CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation