Package org.atmosphere.cpr
Class AtmosphereServlet
- java.lang.Object
-
- jakarta.servlet.GenericServlet
-
- jakarta.servlet.http.HttpServlet
-
- org.atmosphere.cpr.AtmosphereServlet
-
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,java.io.Serializable
- Direct Known Subclasses:
MeteorServlet
public class AtmosphereServlet extends jakarta.servlet.http.HttpServletAtmosphereServlet that use Servlet 3.0 Async API when available, and fallback to native comet support if not available. For Tomcat6/7 and JBossWeb Native support, use atmosphere-native dependencies instead. If Servlet 3.0 or native API isn't found, Atmosphere will useBlockingIOCometSupport.- Author:
- Jeanfrancois Arcand
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AtmosphereFrameworkInitializerinitializerprotected static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description AtmosphereServlet()Create an Atmosphere Servlet.AtmosphereServlet(boolean isFilter)Create an Atmosphere Servlet.AtmosphereServlet(boolean isFilter, boolean autoDetectHandlers)Create an Atmosphere Servlet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AtmosphereServletconfigureFramework(jakarta.servlet.ServletConfig sc)protected AtmosphereServletconfigureFramework(jakarta.servlet.ServletConfig sc, boolean init)voiddestroy()voiddoDelete(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)Delegate the request processing to an instance ofAsyncSupport.voiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)Delegate the request processing to an instance ofAsyncSupport.voiddoHead(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)Delegate the request processing to an instance ofAsyncSupport.voiddoOptions(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)Delegate the request processing to an instance ofAsyncSupportvoiddoPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)Delegate the request processing to an instance ofAsyncSupport.voiddoPut(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)Delegate the request processing to an instance ofAsyncSupport.voiddoTrace(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)Delegate the request processing to an instance ofAsyncSupport.AtmosphereFrameworkframework()voidinit(jakarta.servlet.ServletConfig sc)protected AtmosphereFrameworknewAtmosphereFramework()
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
initializer
protected final AtmosphereFrameworkInitializer initializer
-
-
Constructor Detail
-
AtmosphereServlet
public AtmosphereServlet()
Create an Atmosphere Servlet.
-
AtmosphereServlet
public AtmosphereServlet(boolean isFilter)
Create an Atmosphere Servlet.- Parameters:
isFilter- true if this instance is used as anAtmosphereFilter
-
AtmosphereServlet
public AtmosphereServlet(boolean isFilter, boolean autoDetectHandlers)Create an Atmosphere Servlet.- Parameters:
isFilter- true if this instance is used as anAtmosphereFilter
-
-
Method Detail
-
destroy
public void destroy()
- Specified by:
destroyin interfacejakarta.servlet.Servlet- Overrides:
destroyin classjakarta.servlet.GenericServlet
-
init
public void init(jakarta.servlet.ServletConfig sc) throws jakarta.servlet.ServletException- Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.servlet.GenericServlet- Throws:
jakarta.servlet.ServletException
-
configureFramework
protected AtmosphereServlet configureFramework(jakarta.servlet.ServletConfig sc) throws jakarta.servlet.ServletException
- Throws:
jakarta.servlet.ServletException
-
configureFramework
protected AtmosphereServlet configureFramework(jakarta.servlet.ServletConfig sc, boolean init) throws jakarta.servlet.ServletException
- Throws:
jakarta.servlet.ServletException
-
newAtmosphereFramework
protected AtmosphereFramework newAtmosphereFramework()
-
framework
public AtmosphereFramework framework()
-
doHead
public void doHead(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws java.io.IOException, jakarta.servlet.ServletExceptionDelegate the request processing to an instance ofAsyncSupport.- Overrides:
doHeadin classjakarta.servlet.http.HttpServlet- Parameters:
req- theHttpServletRequestres- theHttpServletResponse- Throws:
java.io.IOExceptionjakarta.servlet.ServletException
-
doOptions
public void doOptions(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws java.io.IOException, jakarta.servlet.ServletExceptionDelegate the request processing to an instance ofAsyncSupport- Overrides:
doOptionsin classjakarta.servlet.http.HttpServlet- Parameters:
req- theHttpServletRequestres- theHttpServletResponse- Throws:
java.io.IOExceptionjakarta.servlet.ServletException
-
doTrace
public void doTrace(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws java.io.IOException, jakarta.servlet.ServletExceptionDelegate the request processing to an instance ofAsyncSupport.- Overrides:
doTracein classjakarta.servlet.http.HttpServlet- Parameters:
req- theHttpServletRequestres- theHttpServletResponse- Throws:
java.io.IOExceptionjakarta.servlet.ServletException
-
doDelete
public void doDelete(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws java.io.IOException, jakarta.servlet.ServletExceptionDelegate the request processing to an instance ofAsyncSupport.- Overrides:
doDeletein classjakarta.servlet.http.HttpServlet- Parameters:
req- theHttpServletRequestres- theHttpServletResponse- Throws:
java.io.IOExceptionjakarta.servlet.ServletException
-
doPut
public void doPut(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws java.io.IOException, jakarta.servlet.ServletExceptionDelegate the request processing to an instance ofAsyncSupport.- Overrides:
doPutin classjakarta.servlet.http.HttpServlet- Parameters:
req- theHttpServletRequestres- theHttpServletResponse- Throws:
java.io.IOExceptionjakarta.servlet.ServletException
-
doGet
public void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws java.io.IOException, jakarta.servlet.ServletExceptionDelegate the request processing to an instance ofAsyncSupport.- Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Parameters:
req- theHttpServletRequestres- theHttpServletResponse- Throws:
java.io.IOExceptionjakarta.servlet.ServletException
-
doPost
public void doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws java.io.IOException, jakarta.servlet.ServletExceptionDelegate the request processing to an instance ofAsyncSupport.- Overrides:
doPostin classjakarta.servlet.http.HttpServlet- Parameters:
req- theHttpServletRequestres- theHttpServletResponse- Throws:
java.io.IOExceptionjakarta.servlet.ServletException
-
-