sunw.demo.quote
Interface QuoteListener
- public interface QuoteListener
- extends java.rmi.Remote
This is the java.rmi.Remote interface that QuoteListeners must implement.
QuoteListeners monitor a single stock, QuoteEvents are delivered
whenever new data for that stock is available. The standard
event mechanism is used for QuoteEvents with one wrinkle:
QuoteListener implementations must extend UnicastRemoteObject.
Method Summary |
java.lang.String |
getStockSymbol()
Called by the QuoteServer before polling the quote source
to discover what stock we're monitoring. |
void |
quoteChanged(QuoteEvent x)
Called by the QuoteServer each time a new QuoteEvent is availble
for the stock symbol returned by getStockSymbol. |
quoteChanged
public void quoteChanged(QuoteEvent x)
throws java.rmi.RemoteException
- Called by the QuoteServer each time a new QuoteEvent is availble
for the stock symbol returned by getStockSymbol.
- Parameters:
x
- timestamped quote data for one stock- See Also:
getStockSymbol()
getStockSymbol
public java.lang.String getStockSymbol()
throws java.rmi.RemoteException
- Called by the QuoteServer before polling the quote source
to discover what stock we're monitoring.
- Returns:
- the symbol for the stock we're interested in