org.xwiki.container.internal
Class DefaultContainer
java.lang.Object
org.xwiki.container.internal.DefaultContainer
- All Implemented Interfaces:
- Container
@Component
public class DefaultContainer
- extends java.lang.Object
- implements Container
We're using ThreadLocals to store the request, response and session so that each thread
(i.e. each user request) has its own value for these objects. In addition we sometime need
to create a new request, response or session even while in the same thread. For this use case
we've added the possibility to push/pop different implementations for these Objects.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultContainer
public DefaultContainer()
getApplicationContext
public ApplicationContext getApplicationContext()
- Specified by:
getApplicationContext in interface Container
pushRequest
public void pushRequest(Request request)
- Specified by:
pushRequest in interface Container
popRequest
public void popRequest()
- Specified by:
popRequest in interface Container
getRequest
public Request getRequest()
- Specified by:
getRequest in interface Container
getResponse
public Response getResponse()
- Specified by:
getResponse in interface Container
pushResponse
public void pushResponse(Response response)
- Specified by:
pushResponse in interface Container
popResponse
public void popResponse()
- Specified by:
popResponse in interface Container
getSession
public Session getSession()
- Specified by:
getSession in interface Container
pushSession
public void pushSession(Session session)
- Specified by:
pushSession in interface Container
popSession
public void popSession()
- Specified by:
popSession in interface Container
setApplicationContext
public void setApplicationContext(ApplicationContext context)
- Specified by:
setApplicationContext in interface Container
setRequest
public void setRequest(Request request)
- Specified by:
setRequest in interface Container
removeRequest
public void removeRequest()
- Specified by:
removeRequest in interface Container
setResponse
public void setResponse(Response response)
- Specified by:
setResponse in interface Container
removeResponse
public void removeResponse()
- Specified by:
removeResponse in interface Container
setSession
public void setSession(Session session)
- Specified by:
setSession in interface Container
removeSession
public void removeSession()
- Specified by:
removeSession in interface Container
Copyright © 2004-2011 XWiki. All Rights Reserved.