public final class ServletContainer extends Object
| Constructor and Description |
|---|
ServletContainer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAuthenticationListener(AuthenticationListener listener)
Add the authentication listener.
|
boolean |
addWebAppListener(WebAppListener listener)
Add a web listener.
|
void |
fireEvent(AuthenticationEvent event) |
String |
getContainerInfo()
Returns the name and version of the servlet container in which the
context is running.
|
Object |
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.
|
static boolean |
isDisabledNativeRegistration(javax.servlet.ServletContext servletContext) |
void |
login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Credentials credentials)
Authentication support.
|
void |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Authentication support.
|
void |
register(ServletContainerContext context)
Register a servlet container context.
|
void |
registerWebApp(WebAppContext webappContext,
String dispatchPath)
Manually register a webapp with this ServletContainerContext.
|
void |
removeAuthenticationlistener(AuthenticationListener listener)
Remove the authentication listener.
|
boolean |
removeWebAppListener(WebAppListener listener)
Removes a web listener.
|
void |
unregisterWebApp(javax.servlet.ServletContext servletContext)
Manually unregister a webapp associated with this ServletContainerContext.
|
void |
visit(ServletContainerVisitor visitor)
Visit the registered WebApps
|
public void registerWebApp(WebAppContext webappContext, String dispatchPath)
webappContext - the WebAppContext associated with the applicationdispatchPath - the path to be usedpublic void unregisterWebApp(javax.servlet.ServletContext servletContext)
servletContext - the servletContext of the application to be deregisteredpublic static boolean isDisabledNativeRegistration(javax.servlet.ServletContext servletContext)
public void register(ServletContainerContext context)
context - the servlet container context to registerIllegalArgumentException - if the context is nullpublic void login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Credentials credentials)
throws javax.servlet.ServletException,
IOException
request - the request valid in the current servlet contextresponse - the response valid in the current servlet contextcredentials - the credentials which try to authenticateAuthenticationException - when authentication failsIllegalStateException - when the user is already authenticatedjavax.servlet.ServletException - any servlet exception that would prevent authentication to be performedIOException - any io exception that would prevent authentication to be performedpublic void logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - the request valid in the current servlet contextresponse - the response valid in the current servlet contextIllegalStateException - when the user is not authenticatedpublic void addAuthenticationListener(AuthenticationListener listener)
listener - AuthenticationListener to addpublic void removeAuthenticationlistener(AuthenticationListener listener)
listener - AuthenticationListener to removepublic String getContainerInfo()
The form of the returned string is containername/versionnumber.
public boolean addWebAppListener(WebAppListener listener)
listener - the listenerpublic boolean removeWebAppListener(WebAppListener listener)
listener - the listenerpublic void fireEvent(AuthenticationEvent event)
public 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
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 callbackjavax.servlet.ServletException - any servlet exceptionIOException - any io exceptionpublic void visit(ServletContainerVisitor visitor)
visitor - ServletContainerVisitor instanceCopyright © 2019 JBoss by Red Hat. All Rights Reserved.