org.activemq.web
Class PortfolioPublishServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.activemq.web.MessageServletSupport
              extended byorg.activemq.web.PortfolioPublishServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class PortfolioPublishServlet
extends MessageServletSupport

A servlet which will publish dummy market data prices

Version:
$Revision: 1.1.1.1 $
See Also:
Serialized Form

Constructor Summary
PortfolioPublishServlet()
           
 
Method Summary
protected  String createStockText(String stock)
           
protected  void doGet(HttpServletRequest request, HttpServletResponse response)
           
protected  int getNumberOfMessages(HttpServletRequest request)
           
 void init()
           
protected  double mutatePrice(double price)
           
protected  void sendMessage(WebClient client, String[] stocks)
           
 
Methods inherited from class org.activemq.web.MessageServletSupport
appendParametersToMessage, asBoolean, asBoolean, asLong, createWebClient, getDestination, getDestination, getDestinationFromURI, getPostedMessageBody, getWebClient, init, isTopic
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, 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

PortfolioPublishServlet

public PortfolioPublishServlet()
Method Detail

init

public void init()
          throws ServletException
Throws:
ServletException

doGet

protected void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     IOException
Throws:
ServletException
IOException

sendMessage

protected void sendMessage(WebClient client,
                           String[] stocks)
                    throws JMSException
Throws:
JMSException

createStockText

protected String createStockText(String stock)

mutatePrice

protected double mutatePrice(double price)

getNumberOfMessages

protected int getNumberOfMessages(HttpServletRequest request)


Copyright © 2004-2007 Protique, Ltd.. All Rights Reserved.