org.jboss.portal.web.impl
Class DefaultServletContainer

java.lang.Object
  extended by org.jboss.portal.web.impl.DefaultServletContainer
All Implemented Interfaces:
ServletContainer

public class DefaultServletContainer
extends java.lang.Object
implements ServletContainer

A static registry for the servlet container context.

Version:
$Revision: 1.1 $
Author:
Julien Viet

Constructor Summary
DefaultServletContainer()
           
 
Method Summary
 boolean addWebAppListener(WebAppListener listener)
          Add a web listener.
 WebExecutor getExecutor(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Returns an executor that will use the provided request and response.
 java.lang.Object include(javax.servlet.ServletContext targetServletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RequestDispatchCallback callback, java.lang.Object handback)
          Generic detyped request dispatch to a servlet context using the include mechanism.
 void register(ServletContainerContext context)
          Register a servlet container context.
 boolean removeWebAppListener(WebAppListener listener)
          Removes a web listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServletContainer

public DefaultServletContainer()
Method Detail

register

public void register(ServletContainerContext context)
Description copied from interface: ServletContainer
Register a servlet container context. The registration is considered as successful if no existing context is already registered.

Specified by:
register in interface ServletContainer
Parameters:
context - the servlet container context to register

getExecutor

public WebExecutor getExecutor(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response)
Description copied from interface: ServletContainer
Returns an executor that will use the provided request and response.

Specified by:
getExecutor in interface ServletContainer
Parameters:
request - the request
response - the response
Returns:
an executor

addWebAppListener

public boolean addWebAppListener(WebAppListener listener)
Description copied from interface: ServletContainer
Add a web listener.

Specified by:
addWebAppListener in interface ServletContainer
Parameters:
listener - the listener
Returns:
true if the listener has been added

removeWebAppListener

public boolean removeWebAppListener(WebAppListener listener)
Description copied from interface: ServletContainer
Removes a web listener.

Specified by:
removeWebAppListener in interface ServletContainer
Parameters:
listener - the listener
Returns:
true if the listener has been removed

include

public java.lang.Object include(javax.servlet.ServletContext targetServletContext,
                                javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                RequestDispatchCallback callback,
                                java.lang.Object handback)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Generic detyped request dispatch to a servlet context using the include mechanism.

Specified by:
include in interface ServletContainer
Parameters:
targetServletContext - the target servlet context to dispatch to
request - the request valid in the current servlet context
response - the response valid in the current servlet context
callback - the callback to perform after the dispatch operation
handback - the handback object that will be provided to the callback
Returns:
the object returned by the callback
Throws:
javax.servlet.ServletException - any servlet exception
java.io.IOException - any io exception


Copyright © 2008. All Rights Reserved.