@UESComponent public interface UWTContextFactory
| Modifier and Type | Method and Description | 
|---|---|
UWTContext | 
createContext(javax.servlet.http.HttpServletRequest aRequest,
 Creates an UWTContext bound to specified request and response. 
 | 
void | 
destroyContext(UWTContext aContext)
Destroys the context. 
 | 
UWTContext | 
getCurrentContext()
Returns the UWTContext associated with currently running thread. 
 | 
 Creates an UWTContext bound to specified request and response. After the
 creation, the context can be obtained also by using
 UWTContextFactory.getCurrentContext() within the same thread. Once the processing of
 the request ends, the context should be properly destroyed by calling
 UWTContextFactory.destroyContext(UWTContext) using try-finally pattern:
 
 
UWTContext ctx = factory.createContext(request, response);
try {
  // ... (work with context)
} finally {
  factory.destroyContext(ctx);
}
 
 
 
 Typically, #createContext(Request, Response) and
 UWTContextFactory.destroyContext(UWTContext) are called at the beginning, resp. at
 the end of the request processing, and UWTContextFactory.getCurrentContext() is
 called anytime between these two boundaries.
 
aRequest - The request.aResponse - The response.aContext - The context.