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 Classes
    Modifier and Type
    Interface
    Description
    static interface 
    The callback interface that a servlet container context can obtain from its registration against the org.jboss.portal.web.ServletContainer singleton.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name and version of the servlet container in which the context is running.
    include(jakarta.servlet.ServletContext targetServletContext, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, RequestDispatchCallback callback, Object handback)
    Generic detyped request dispatch to a servlet context using the include mechanism.
    void
    login(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Credentials credentials)
    Authentication support.
    void
    logout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Authentication support.
    void
    Install the call back object.
    void
    Uninstall the call back object.
  • Method Details

    • include

      Object include(jakarta.servlet.ServletContext targetServletContext, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, RequestDispatchCallback callback, Object handback) throws jakarta.servlet.ServletException, IOException
      Generic detyped request dispatch to a servlet context using the include mechanism.
      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:
      jakarta.servlet.ServletException - any servlet exception
      IOException - any io exception
    • setCallback

      void setCallback(ServletContainerContext.Registration registration)
      Install the call back object.
      Parameters:
      registration - the call back
    • unsetCallback

      void unsetCallback(ServletContainerContext.Registration registration)
      Uninstall the call back object.
      Parameters:
      registration - the call back
    • login

      void login(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Credentials credentials) throws AuthenticationException, jakarta.servlet.ServletException, IOException
      Authentication support.
      Parameters:
      request - the request valid in the current servlet context
      response - the response valid in the current servlet context
      credentials - the credentials which try to authenticate
      Throws:
      AuthenticationException - when authentication fails
      jakarta.servlet.ServletException - any servlet exception that would prevent authentication to be performed
      IOException - any io exception that would prevent authentication to be performed
    • logout

      void logout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException
      Authentication support.
      Parameters:
      request - the request valid in the current servlet context
      response - the response valid in the current servlet context
      Throws:
      jakarta.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