Package io.bootique.jetty.servlet
Class DefaultServletEnvironment
- java.lang.Object
-
- io.bootique.jetty.servlet.DefaultServletEnvironment
-
- All Implemented Interfaces:
ServletEnvironment,EventListener,javax.servlet.ServletContextListener,javax.servlet.ServletRequestListener
public class DefaultServletEnvironment extends Object implements javax.servlet.ServletContextListener, javax.servlet.ServletRequestListener, ServletEnvironment
-
-
Constructor Summary
Constructors Constructor Description DefaultServletEnvironment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<javax.servlet.ServletContext>context()voidcontextDestroyed(javax.servlet.ServletContextEvent sce)voidcontextInitialized(javax.servlet.ServletContextEvent sce)Optional<javax.servlet.http.HttpServletRequest>request()Returns an optional for HttpServletRequest currently in progress.voidrequestDestroyed(javax.servlet.ServletRequestEvent sre)voidrequestInitialized(javax.servlet.ServletRequestEvent sre)
-
-
-
Method Detail
-
context
public Optional<javax.servlet.ServletContext> context()
- Specified by:
contextin interfaceServletEnvironment
-
request
public Optional<javax.servlet.http.HttpServletRequest> request()
Description copied from interface:ServletEnvironmentReturns an optional for HttpServletRequest currently in progress. Will only return a non-empty Optional when invoked within an ongoing request thread.- Specified by:
requestin interfaceServletEnvironment- Returns:
- an optional for HttpServletRequest currently in progress.
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
- Specified by:
contextInitializedin interfacejavax.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyedin interfacejavax.servlet.ServletContextListener
-
requestInitialized
public void requestInitialized(javax.servlet.ServletRequestEvent sre)
- Specified by:
requestInitializedin interfacejavax.servlet.ServletRequestListener
-
requestDestroyed
public void requestDestroyed(javax.servlet.ServletRequestEvent sre)
- Specified by:
requestDestroyedin interfacejavax.servlet.ServletRequestListener
-
-