Package org.gatein.wci.spi
Interface ServletContainerContext
public interface ServletContainerContext
Defines the service provider interface for a servlet container. It is an attempt to abstract the non
portable services required by a portal with respect to the web container layer.
- Version:
- $Revision: 1.1 $
- Author:
- Julien Viet
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe callback interface that a servlet container context can obtain from its registration against theorg.jboss.portal.web.ServletContainersingleton. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name and version of the servlet container in which the context is running.include(javax.servlet.ServletContext targetServletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RequestDispatchCallback callback, Object handback) Generic detyped request dispatch to a servlet context using the include mechanism.voidlogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Credentials credentials) Authentication support.voidlogout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Authentication support.voidsetCallback(ServletContainerContext.Registration registration) Install the call back object.voidunsetCallback(ServletContainerContext.Registration registration) Uninstall the call back object.
-
Method Details
-
include
Object include(javax.servlet.ServletContext targetServletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RequestDispatchCallback callback, Object handback) throws javax.servlet.ServletException, IOException Generic detyped request dispatch to a servlet context using the include mechanism.- Parameters:
targetServletContext- the target servlet context to dispatch torequest- the request valid in the current servlet contextresponse- the response valid in the current servlet contextcallback- the callback to perform after the dispatch operationhandback- the handback object that will be provided to the callback- Returns:
- the object returned by the callback
- Throws:
javax.servlet.ServletException- any servlet exceptionIOException- any io exception
-
setCallback
Install the call back object.- Parameters:
registration- the call back
-
unsetCallback
Uninstall the call back object.- Parameters:
registration- the call back
-
login
void login(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Credentials credentials) throws AuthenticationException, javax.servlet.ServletException, IOException Authentication support.- Parameters:
request- the request valid in the current servlet contextresponse- the response valid in the current servlet contextcredentials- the credentials which try to authenticate- Throws:
AuthenticationException- when authentication failsjavax.servlet.ServletException- any servlet exception that would prevent authentication to be performedIOException- any io exception that would prevent authentication to be performed
-
logout
void logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException Authentication support.- Parameters:
request- the request valid in the current servlet contextresponse- the response valid in the current servlet context- Throws:
javax.servlet.ServletException
-
getContainerInfo
String getContainerInfo()Returns the name and version of the servlet container in which the context is running.The form of the returned string is
containername/versionnumber.- Returns:
- the string containing at least name and version number
-