|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.barracuda.core.util.http.ContextServices
This class defines a convenience method to get the servlet context. It also provides a mechanism to easily cache objects in the session by Reference (which allows them to automatically be removed from the session if the system starts running low on memory)
Field Summary | |
static java.lang.String |
KEY
|
protected static org.apache.log4j.Logger |
logger
|
Constructor Summary | |
ContextServices()
|
Method Summary | |
static javax.servlet.ServletContext |
getContext(ControlEventContext ec)
get the servlet context from a ControlEventContext |
static javax.servlet.ServletContext |
getContext(ViewContext vc)
get the servlet context from a ViewContext |
static java.lang.Object |
getObjectFromCache(ControlEventContext ec,
java.lang.Object key,
ReferenceFactory factory)
This method retrieves the servlet context from a ControlEventContext, and then looks for an object in the servlet context based on a given key. |
static java.lang.Object |
getObjectFromCache(javax.servlet.ServletContext context,
java.lang.Object key,
ReferenceFactory factory)
This method looks for an object in the servlet context based on a given key. |
static java.lang.Object |
getObjectFromCache(ViewContext vc,
java.lang.Object key,
ReferenceFactory factory)
This method retrieves the servlet context from a ViewContext, and then looks for an object in the servlet context based on a given key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String KEY
protected static org.apache.log4j.Logger logger
Constructor Detail |
public ContextServices()
Method Detail |
public static javax.servlet.ServletContext getContext(ViewContext vc)
vc
- the ControlEventContext object
public static javax.servlet.ServletContext getContext(ControlEventContext ec)
ec
- the ControlEventContext object
public static java.lang.Object getObjectFromCache(ViewContext vc, java.lang.Object key, ReferenceFactory factory)
vc
- the ViewContextkey
- the key that identifies this objectfactory
- the ReferenceFactory used to create the object
public static java.lang.Object getObjectFromCache(ControlEventContext ec, java.lang.Object key, ReferenceFactory factory)
ec
- the ControlEventContextkey
- the key that identifies this objectfactory
- the ReferenceFactory used to create the object
public static java.lang.Object getObjectFromCache(javax.servlet.ServletContext context, java.lang.Object key, ReferenceFactory factory)
context
- the ServletContextkey
- the key that identifies this objectfactory
- the ReferenceFactory used to create the object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |