org.apache.activemq.web
Class AjaxServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.activemq.web.MessageServletSupport
              extended by org.apache.activemq.web.MessageListenerServlet
                  extended by org.apache.activemq.web.AjaxServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class AjaxServlet
extends MessageListenerServlet

AjaxServlet. The AjaxServlet extends the MessageListenerServlet with the capability to server the amq.js script and associated scripts from resources within the activemq-web jar. The amq.js script is the client side companion to the MessageListenerServlet and supports sending messages and long polling for receiving messages (Also called Comet style Ajax).

See Also:
Serialized Form

Constructor Summary
AjaxServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Supports a HTTP DELETE to be equivlanent of consuming a singe message from a queue
protected  void doJavaScript(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class org.apache.activemq.web.MessageListenerServlet
doMessages, doPost, getAjaxWebClient, getReadTimeout, init, writeMessageResponse
 
Methods inherited from class org.apache.activemq.web.MessageServletSupport
appendParametersToMessage, asBoolean, asBoolean, asDestination, asInt, asInteger, asLong, asLong, asString, getDestination, getDestination, getDestinationFromURI, getPostedMessageBody, getSelector, getSendPriority, getSendTimeToLive, init, isSendPersistent, isSync, isTopic
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxServlet

public AjaxServlet()
Method Detail

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     java.io.IOException
Description copied from class: MessageListenerServlet
Supports a HTTP DELETE to be equivlanent of consuming a singe message from a queue

Overrides:
doGet in class MessageListenerServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doJavaScript

protected void doJavaScript(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws java.io.IOException,
                            javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException


Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.