com.ibm.wsspi.webcontainer.servlet
Interface IServletWrapper
All Superinterfaces:
All known implementing classes:
- public interface IServletWrapper
- extends RequestProcessor
See Also:
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addServletReferenceListener(ServletReferenceListener wrapper)
Adds a ServletReferenceListener to this wrapper
|
|
destroy()
Signals that this wrapper should now be destroyed.
|
|
getLastAccessTime()
Returns the time when this wrapper was last accessed
|
getServletConfig()
Returns the servlet config associated with this servlet wrapper
|
|
|
getServletContext()
Returns the servlet context associated with this servlet wrapper.
|
|
getServletName()
Returns the servlet name of the servlet wrapped by this servlet wrapper
|
|
getTarget()
Gets the target Servlet that this wrapper is wrapping
|
|
getTargetClassLoader()
Returns the ClassLoader instance that was used to load, or will be used
to load the Servlet wrapped by this servlet wrapper
|
|
handleRequest(ServletRequest req,ServletResponse res)
This method will be called by the webcontainer when a request is intended
for this wrapper.
|
|
initialize(IServletConfig config)
Initializes this wrapper with the specified config.
|
|
isAvailable()
Returns whether the requested wrapper resource exists.
|
|
load()
Loads the servlet and calls the Servlet's init method with the previously passed IServletConfig.
|
|
loadOnStartupCheck()
Initializes this wrapper with the specified config.
|
|
modifyTarget(Servlet s)
|
|
prepareForReload()
Signals that this wrapper is going to be recycled
|
|
service(ServletRequest request,ServletResponse response)
|
|
setParent(IServletContext parent)
Sets the parent context for this servletwrapper
|
|
setTarget(Servlet target)
Sets the target Servlet that this wrapper should wrap
|
|
setTargetClassLoader(java.lang.ClassLoader loader)
Instructs the webcontainer to use the specified ClassLoader to load the
Servlet wrapped by this servlet wrapper.
|
Methods inherited from interface com.ibm.wsspi.webcontainer.RequestProcessor |
---|
getName, isInternal |
Method Detail
getServletConfig
- IServletConfig getServletConfig( )
Returns the servlet config associated with this servlet wrapper
Returns:
getServletContext
- ServletContext getServletContext( )
Returns the servlet context associated with this servlet wrapper.
Returns:
setParent
- void setParent(IServletContext parent)
Sets the parent context for this servletwrapper
getServletName
- java.lang.String getServletName( )
Returns the servlet name of the servlet wrapped by this servlet wrapper
Returns:
setTargetClassLoader
- void setTargetClassLoader(java.lang.ClassLoader loader)
Instructs the webcontainer to use the specified ClassLoader to load the
Servlet wrapped by this servlet wrapper.
Parameters:
loader
- getTargetClassLoader
- java.lang.ClassLoader getTargetClassLoader( )
Returns the ClassLoader instance that was used to load, or will be used
to load the Servlet wrapped by this servlet wrapper
setTarget
- void setTarget(Servlet target)
Sets the target Servlet that this wrapper should wrap
Parameters:
target
- getTarget
- Servlet getTarget()
Gets the target Servlet that this wrapper is wrapping
Returns:
initialize
- void initialize(IServletConfig config)
- throws java.lang.Exception
Initializes this wrapper with the specified config. Depending on the
startup weight specified in the config, the underlying target Servlet
will either be initialized within this call.
NOTE: This initialization behaviour of the target Servlet can be controlled by
calling the setStartUpWeight() method on the IServletConfig
loadOnStartupCheck
- void loadOnStartupCheck()
- throws java.lang.Exception
Initializes this wrapper with the specified config. Depending on the
startup weight specified in the config, the underlying target Servlet
will either be initialized within this call.
NOTE: This initialization behaviour of the target Servlet can be controlled by
calling the setStartUpWeight() method on the IServletConfig
handleRequest
- void handleRequest(ServletRequest req,
- ServletResponse res)
- throws java.lang.Exception
This method will be called by the webcontainer when a request is intended
for this wrapper. Classes directly implementing this interface (without
extending GenericServletWrapper) will have to handle all aspects of the
request processing.
NOTE: Components wishing to provide their own servlet wrappers are strongly
urged to extend the GenericServletWrapper class, which has convenience methods
to help with better integration with the webcontainer. Subclasses can delegate
request processing to the GenericServletWrapper by invoking the
super.handleRequest() method
Specified by:
handleRequest
in interface RequestProcessor
Throws:
java.lang.Exception
prepareForReload
- void prepareForReload()
Signals that this wrapper is going to be recycled
addServletReferenceListener
- void addServletReferenceListener( ServletReferenceListener wrapper)
Adds a ServletReferenceListener to this wrapper
Parameters:
wrapper
- getLastAccessTime
- long getLastAccessTime()
Returns the time when this wrapper was last accessed
Returns:
destroy
- void destroy()
Signals that this wrapper should now be destroyed.
service
- void service(ServletRequest request,
- ServletResponse response)
- throws java.io.IOException
- ServletException
Parameters:
request
- response
- Throws:
java.io.IOException
ServletException
isAvailable
- boolean isAvailable()
Returns whether the requested wrapper resource exists.
load
- void load()
- throws java.lang.Exception
Loads the servlet and calls the Servlet's init method with the previously passed IServletConfig.
One component that calls this is SIP.
Throws:
java.lang.Exception
modifyTarget
- void modifyTarget(Servlet s)