org.atmosphere.samples.chat
Class MeteorChat
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.atmosphere.samples.chat.MeteorChat
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
public class MeteorChat
- extends HttpServlet
Simple Servlet that implement the logic to build a Chat application using
a Meteor to suspend and broadcast chat message.
- Author:
- Jeanfrancois Arcand
- See Also:
- Serialized Form
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MeteorChat
public MeteorChat()
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse res)
throws IOException
- Create a
Meteor and use it to suspend the response.
- Overrides:
doGet in class HttpServlet
- Parameters:
req - An HttpServletRequestres - An HttpServletResponse
- Throws:
IOException
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse res)
throws IOException
- Re-use the
Meteor created onthe first GET for broadcasting message.
- Overrides:
doPost in class HttpServlet
- Parameters:
req - An HttpServletRequestres - An HttpServletResponse
- Throws:
IOException
Copyright © 2010. All Rights Reserved.