|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectControlBeanContext
ControlContainerContext
ServletBeanContext
public class ServletBeanContext
The ServletBeanContext provides a ControlBeanContext implementation that offers services and a resource management context that is appropriate to web tier usage of controls.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface ControlBeanContext |
---|
ControlBeanContext.LifeCycle |
Field Summary |
---|
Fields inherited from interface BeanContext |
---|
globalHierarchyLock |
Fields inherited from interface DesignMode |
---|
PROPERTYNAME |
Constructor Summary | |
---|---|
ServletBeanContext()
|
Method Summary | ||
---|---|---|
void |
beginContext(ServletContext context,
ServletRequest req,
ServletResponse resp)
Begins a new execution context, associated with a specific ServletRequest |
|
void |
endContext()
Ends the current execution context, and resetes the current active ServletRequest. |
|
URL |
getResource(String name,
BeanContextChild bcc)
Override BeanContext.getResource() so it delegates to the current ServletContext. |
|
InputStream |
getResourceAsStream(String name,
BeanContextChild bcc)
Override BeanContext.getResourceAsStream() so it delegates to the current ServletContext. |
|
|
getService(Class<T> serviceClass,
Object selector)
Override ControlBeanContext.getService(). |
|
ServletContext |
getServletContext()
Returns the ServletContext associated with this context (or null if not currently processing a request) |
|
ServletRequest |
getServletRequest()
Returns the ServletRequest associated with this context (or null if not currently processing a request) |
|
ServletResponse |
getServletResponse()
Returns the ServletResponse associated with this context (or null if not currently processing a request) |
|
void |
initialize()
Called by BeanContextSupport superclass during construction and deserialization to initialize subclass transient state |
|
void |
setWrappers(boolean useWrappers)
Enables/disable the use of request/response wrappers for this context. |
|
protected boolean |
useWrappers()
|
Methods inherited from class ControlContainerContext |
---|
addResourceContext, beginContext, dispatchEvent, getControlHandle, isSingleThreadedContainer, releaseResources, removeResourceContext |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface BeanContextServices |
---|
addBeanContextServicesListener, addService, getCurrentServiceClasses, getCurrentServiceSelectors, getService, hasService, releaseService, removeBeanContextServicesListener, revokeService |
Methods inherited from interface BeanContext |
---|
addBeanContextMembershipListener, instantiateChild, removeBeanContextMembershipListener |
Methods inherited from interface BeanContextChild |
---|
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext |
Methods inherited from interface Collection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Methods inherited from interface DesignMode |
---|
isDesignTime, setDesignTime |
Methods inherited from interface Visibility |
---|
avoidingGui, dontUseGui, needsGui, okToUseGui |
Methods inherited from interface BeanContextServicesListener |
---|
serviceAvailable |
Methods inherited from interface BeanContextServiceRevokedListener |
---|
serviceRevoked |
Constructor Detail |
---|
public ServletBeanContext()
Method Detail |
---|
public void initialize()
initialize
in class ControlContainerContext
public void beginContext(ServletContext context, ServletRequest req, ServletResponse resp)
public void endContext()
endContext
in interface ControlContainerContext
endContext
in class ControlContainerContext
public ServletContext getServletContext()
public ServletRequest getServletRequest()
public ServletResponse getServletResponse()
public void setWrappers(boolean useWrappers)
public InputStream getResourceAsStream(String name, BeanContextChild bcc) throws IllegalArgumentException
getResourceAsStream
in interface BeanContext
getResourceAsStream
in class ControlBeanContext
name
- the resource namebcc
- the specified child
InputStream
for reading the resource, or
null
if the resource could not be found.
IllegalArgumentException
- IllegalArgumentException
if the resource is not validpublic URL getResource(String name, BeanContextChild bcc) throws IllegalArgumentException
getResource
in interface BeanContext
getResource
in class ControlBeanContext
name
- the resource namebcc
- the specified child
URL
for the named
resource for the specified child
IllegalArgumentException
- IllegalArgumentException
if the resource is not validpublic <T> T getService(Class<T> serviceClass, Object selector)
getService
in interface ControlBeanContext
getService
in class ControlBeanContext
serviceClass
- selector
-
BeanContextServices.getService(java.beans.beancontext.BeanContextChild, java.lang.Object, java.lang.Class, java.lang.Object, java.beans.beancontext.BeanContextServiceRevokedListener)
protected boolean useWrappers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |