Package edu.uiuc.ncsa.security.servlet
Interface Initialization
-
- All Known Implementing Classes:
SASServletInitializer
public interface InitializationThe reason this class exists is because of Java single-inheritence. A top-level servlet class has an init() method that is called. However, if there are many subclasses of this it can be very hard to change their initialization without over-riding several classes or doing something very odd, such as extending a single subclass to do nothing but over-ride its parent then putting in machinery to prevent the parent from running its init method. Hardly ideal.This interface decouples initialization from the servlet. TheBootstrapperis tasked with making the correct instance of this class which is then injected into the servlet statically on boot. This in turn is called in the servlet init method.
This solves issue OAUTH-112.Created by Jeff Gaynor
on 4/15/14 at 10:24 AM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AbstractEnvironmentgetEnvironment()ExceptionHandlergetExceptionHandler()AbstractServletgetServlet()Many initialization tasks can only be done dynamically, after the servlet has been created and itsServletContextset.voidinit()This should handle all initialization tasks for a servlet.voidsetEnvironment(AbstractEnvironment environment)voidsetServlet(AbstractServlet servlet)
-
-
-
Method Detail
-
init
void init() throws javax.servlet.ServletException
This should handle all initialization tasks for a servlet. Set the environment before use.- Throws:
javax.servlet.ServletException
-
setEnvironment
void setEnvironment(AbstractEnvironment environment)
-
getEnvironment
AbstractEnvironment getEnvironment()
-
getServlet
AbstractServlet getServlet()
Many initialization tasks can only be done dynamically, after the servlet has been created and itsServletContextset. There has to be a back reference to or you cannot completely control servlet startup.- Returns:
-
setServlet
void setServlet(AbstractServlet servlet)
-
getExceptionHandler
ExceptionHandler getExceptionHandler()
-
-