org.apache.activemq.web
Class PortfolioPublishServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.activemq.web.MessageServletSupport
org.apache.activemq.web.PortfolioPublishServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.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
Method Summary |
protected java.lang.String |
createStockText(java.lang.String stock)
|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected int |
getNumberOfMessages(javax.servlet.http.HttpServletRequest request)
|
void |
init()
|
protected double |
mutatePrice(double price)
|
protected void |
sendMessage(WebClient client,
java.lang.String[] stocks)
|
Methods inherited from class org.apache.activemq.web.MessageServletSupport |
appendParametersToMessage, asBoolean, asBoolean, asDestination, asInt, asInteger, asLong, asLong, asString, getDestination, getDestination, getDestinationFromURI, getPostedMessageBody, getSendPriority, getSendTimeToLive, init, isSendPersistent, 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 |
PortfolioPublishServlet
public PortfolioPublishServlet()
init
public void init()
throws javax.servlet.ServletException
- Overrides:
init
in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
sendMessage
protected void sendMessage(WebClient client,
java.lang.String[] stocks)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
createStockText
protected java.lang.String createStockText(java.lang.String stock)
mutatePrice
protected double mutatePrice(double price)
getNumberOfMessages
protected int getNumberOfMessages(javax.servlet.http.HttpServletRequest request)
Copyright © 2010 Apache Software Foundation. All Rights Reserved.