com.ibm.wsspi.webcontainer.servlet

Interface IServletContext


  1. public interface IServletContext
This is an extension to IBMServletContext which can be used to

Method Summary

Modifier and Type Method and Description
  1. void
addFeature(WebContainerConstants.Feature feature)
Used to indicate that a Feature is enabled for this context.
  1. void
addLifecycleListener(java.util.EventListener eventListener)
Adds a lifecycle event listener to this context.
  1. void
addMappingFilter(IServletConfig sConfig,IFilterConfig config)
Adds a filter against a specified servlet config into this context
  1. void
addMappingFilter(java.lang.String mapping,IFilterConfig config)
Adds a filter against a specified mapping into this context
  1. void
addMappingTarget(java.lang.String mapping,RequestProcessor target)
Adds a target against a specified mapping into this context
  1. void
addToStartWeightList(IServletConfig sc)
  1. boolean
containsTargetMapping(java.lang.String mapping)
  1. IFilterConfig
createFilterConfig(java.lang.String id)
Creates a IFilterConfig object for this context
  1. IServletWrapper
createServletWrapper(IServletConfig sconfig)
Convenience method that creates an IServletWrapper given the servlet config.
  1. void
finishEnvSetup(boolean transactional)
Called by components leveraging the webcontainer to tear down the environment that was setup by a previous call to startEnvSetup(); (1) Namespace - to enable namespace lookups (2) Setup the classloader on the thread to be that of the WebApp.
  1. java.lang.ClassLoader
getClassLoader()
Returns the classLoader that this context used to load its resources
  1. ICollaboratorHelper
getCollaboratorHelper()
  1. java.lang.String
getCommonTempDirectory()
  1. ServletContext
getFacade()
Called by components utilizing IServletContext (ie session) that provide access to a ServletContext object to applications.
  1. WebAppFilterManager
getFilterManager()
Returns the web app filter manager associated with this context.
  1. RequestProcessor
getMappingTarget(java.lang.String mapping)
Returns the target that matches (according to the rules under servlet mappings in the servlet spec.) the given mapping.
  1. Container
getModuleContainer()
  1. java.util.Set
getResourcePaths(java.lang.String path,boolean searchMetaInf)
  1. com.ibm.ws.webcontainer.session.IHttpSessionContext
getSessionContext()
  1. WebComponentMetaData
getWebAppCmd()
  1. WebAppConfig
getWebAppConfig()
Returns the configuration object associated with this context
  1. IInvocationCollaborator[]
getWebAppInvocationCollaborators()
  1. boolean
isCachingEnabled()
  1. boolean
isFeatureEnabled(WebContainerConstants.Feature feature)
  1. boolean
isFiltersDefined()
Returns whether or not filters are defined with this context.
  1. boolean
isInitialized()
  1. void
removeLifeCycleListener(java.util.EventListener eventListener)
Removes an existing listener from this context's list of listeners.
  1. void
replaceMappingTarget(java.lang.String mapping,RequestProcessor target)
Replaces the target for the specified mapping in this context
  1. void
startEnvSetup(boolean transactional)
Called by components leveraging the webcontainer to set up the environments necessary (1) Namespace - to enable namespace lookups (2) Setup the classloader on the thread to be that of the WebApp.
  1. java.util.Iterator
targets()
Returns an iterator of all the targets currently loaded (not necessarily initialized) by this context.

Method Detail

addLifecycleListener

  1. void addLifecycleListener(java.util.EventListener eventListener)
Adds a lifecycle event listener to this context. The listner can be any of the standard listeners mandated by the Servlet 2.4 specification.
Parameters:
eventListener -

removeLifeCycleListener

  1. void removeLifeCycleListener(java.util.EventListener eventListener)
Removes an existing listener from this context's list of listeners. NOTE: Listeners of the type HttpSessionListener currently have no way of being removed.
Parameters:
eventListener -

getWebAppConfig

  1. WebAppConfig getWebAppConfig()
Returns the configuration object associated with this context
Returns:

getFilterManager

  1. WebAppFilterManager getFilterManager( )
Returns the web app filter manager associated with this context.
Returns:

isFiltersDefined

  1. boolean isFiltersDefined()
Returns whether or not filters are defined with this context.
Returns:

createServletWrapper

  1. IServletWrapper createServletWrapper( IServletConfig sconfig)
  2. throws java.lang.Exception
Convenience method that creates an IServletWrapper given the servlet config.
Parameters:
sconfig -
Returns:
Throws:
java.lang.Exception

targets

  1. java.util.Iterator targets()
Returns an iterator of all the targets currently loaded (not necessarily initialized) by this context. The target objects are all RequestProcessors, and may be either IServletWrappers or ExtensionProcessors
Returns:

getMappingTarget

  1. RequestProcessor getMappingTarget( java.lang.String mapping)
Returns the target that matches (according to the rules under servlet mappings in the servlet spec.) the given mapping.
Parameters:
mapping -
Returns:

addMappingTarget

  1. void addMappingTarget(java.lang.String mapping,
  2. RequestProcessor target)
  3. throws java.lang.Exception
Adds a target against a specified mapping into this context
Parameters:
mapping -
target -
Throws:
java.lang.Exception

containsTargetMapping

  1. boolean containsTargetMapping(java.lang.String mapping)

replaceMappingTarget

  1. void replaceMappingTarget(java.lang.String mapping,
  2. RequestProcessor target)
  3. throws java.lang.Exception
Replaces the target for the specified mapping in this context
Parameters:
mapping -
target -
Throws:
java.lang.Exception

createFilterConfig

  1. IFilterConfig createFilterConfig( java.lang.String id)
Creates a IFilterConfig object for this context
Parameters:
id -
Returns:

addMappingFilter

  1. void addMappingFilter(java.lang.String mapping,
  2. IFilterConfig config)
Adds a filter against a specified mapping into this context
Parameters:
mapping -
config -

addMappingFilter

  1. void addMappingFilter(IServletConfig sConfig,
  2. IFilterConfig config)
Adds a filter against a specified servlet config into this context
Parameters:
sConfig -
config -

getClassLoader

  1. java.lang.ClassLoader getClassLoader( )
Returns the classLoader that this context used to load its resources
Returns:

startEnvSetup

  1. void startEnvSetup(boolean transactional)
  2. throws java.lang.Exception
Called by components leveraging the webcontainer to set up the environments necessary (1) Namespace - to enable namespace lookups (2) Setup the classloader on the thread to be that of the WebApp. (3) Depending on the transactional parameter passed, setup transaction related environment
Parameters:
transactional -
Throws:
java.lang.Exception

finishEnvSetup

  1. void finishEnvSetup(boolean transactional)
  2. throws java.lang.Exception
Called by components leveraging the webcontainer to tear down the environment that was setup by a previous call to startEnvSetup(); (1) Namespace - to enable namespace lookups (2) Setup the classloader on the thread to be that of the WebApp. (3) Depending on the transactional parameter passed, setup transaction related environment
Parameters:
transactional -
Throws:
java.lang.Exception

addFeature

  1. void addFeature(WebContainerConstants.Feature feature)
Used to indicate that a Feature is enabled for this context.
Parameters:
feature -

isFeatureEnabled

  1. boolean isFeatureEnabled(WebContainerConstants.Feature feature)

getFacade

  1. ServletContext getFacade()
Called by components utilizing IServletContext (ie session) that provide access to a ServletContext object to applications. Since IServletContext provides access to webcontainer internals, components are allowed to only expose the facade object to applications and not the enhanced WebContainer ServletContext implementation IServletContext.
Returns:

getCollaboratorHelper

  1. ICollaboratorHelper getCollaboratorHelper( )

getCommonTempDirectory

  1. java.lang.String getCommonTempDirectory( )

isCachingEnabled

  1. boolean isCachingEnabled()

getWebAppInvocationCollaborators

  1. IInvocationCollaborator[] getWebAppInvocationCollaborators( )

getSessionContext

  1. com.ibm.ws.webcontainer.session.IHttpSessionContext getSessionContext( )

addToStartWeightList

  1. void addToStartWeightList(IServletConfig sc)

isInitialized

  1. boolean isInitialized()

getWebAppCmd

  1. WebComponentMetaData getWebAppCmd( )

getResourcePaths

  1. java.util.Set getResourcePaths( java.lang.String path,
  2. boolean searchMetaInf)

getModuleContainer

  1. Container getModuleContainer()