Package org.springframework.amqp.rabbit.stocks.domain

Examples of org.springframework.amqp.rabbit.stocks.domain.Stock


  public void setStockController(StockController stockController) {
    this.stockController = stockController;
  }

  public void handleMessage(Quote quote) {
    Stock stock = quote.getStock();
    log.info("Received market data.  Ticker = " + stock.getTicker() + ", Price = " + quote.getPrice());
    stockController.displayQuote(quote);
  }
View Full Code Here


  }

  public void displayQuote(final Quote quote) {
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        Stock stock = quote.getStock();
        marketDataTextArea.append(stock.getTicker() + " " + quote.getPrice() + "\n");
      }
    });
  }
View Full Code Here

  }


  public void sendMarketData() {
    Quote quote = generateFakeQuote();
    Stock stock = quote.getStock();
    logger.info("Sending Market Data for " + stock.getTicker());
    String routingKey = "app.stock.quotes."+ stock.getStockExchange() + "." + stock.getTicker();
    getRabbitTemplate().convertAndSend(routingKey, quote);
  }
View Full Code Here

TOP

Related Classes of org.springframework.amqp.rabbit.stocks.domain.Stock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.