home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / JBuilder / BDK / Win / bdk_sep97.exe / _SETUP.1 / QuoteEvent.java < prev    next >
Encoding:
Java Source  |  1997-09-10  |  1.3 KB  |  57 lines

  1.  
  2. package sunw.demo.quote;
  3.  
  4. import java.util.Date;
  5. import java.util.EventObject;
  6.  
  7.  
  8. /** 
  9.  * Simple encapsulation of quote data for a single stock.  Note that 
  10.  * this class is serializable because EventObject implements 
  11.  * java.io.Serializable.  The QuoteServer communicates with remote 
  12.  * QuoteListeners (used by the QuoteMonitor bean) via QuoteEvents.
  13.  * 
  14.  * @see sunw.demo.quote.QuoteServer
  15.  * @see sunw.demo.quote.QuoteListener
  16.  */
  17.  
  18. public class QuoteEvent extends EventObject
  19. {
  20.   private String symbol;
  21.   private Date date;
  22.   private double price;
  23.   private double bid;
  24.   private double ask;
  25.   private double open;
  26.   private long volume;
  27.  
  28.   QuoteEvent(
  29.     QuoteServer source,
  30.     String symbol,
  31.     Date date,
  32.     double price,
  33.     double bid,
  34.     double ask,
  35.     double open,
  36.     long volume)
  37.   {
  38.     super(source);
  39.     this.symbol = symbol;
  40.     this.date = date;
  41.     this.price = price;
  42.     this.bid = bid;
  43.     this.ask = ask;
  44.     this.open = open;
  45.     this.volume = volume;
  46.   }  
  47.  
  48.   public String getSymbol() {return symbol;}
  49.   public Date getDate() {return date;}
  50.   public double getPrice() {return price;}
  51.   public double getBid() {return bid;}
  52.   public double getAsk() {return ask;}
  53.   public double getOpen() {return open;}
  54.   public long getVolume() {return volume;}
  55. }
  56.  
  57.