nl.justobjects.pushlet.test
Class TestEventPushSources.AEXStocksEventPushSource

java.lang.Object
  extended by nl.justobjects.pushlet.test.TestEventPushSources.AEXStocksEventPushSource
All Implemented Interfaces:
java.lang.Runnable, EventSource
Enclosing class:
TestEventPushSources

public static class TestEventPushSources.AEXStocksEventPushSource
extends java.lang.Object
implements EventSource, java.lang.Runnable

Produces events from REAL stocks from the AEX.


Nested Class Summary
(package private)  class TestEventPushSources.AEXStocksEventPushSource.Stock
           
 
Field Summary
(package private)  boolean active
           
static java.lang.String EMPTY
           
static int NR_OF_STOCKS
           
(package private)  java.lang.String pageURL
          Here we get our stocks from.
private  int restarts
           
(package private)  java.util.Vector stocksCache
           
(package private)  java.lang.Thread thread
           
 
Constructor Summary
TestEventPushSources.AEXStocksEventPushSource()
           
 
Method Summary
 void activate()
          Activate the event source.
private  java.lang.String getStocksLine()
           
 void passivate()
          Deactivate the event source.
private  void publishStock(int index, java.lang.String name, java.lang.String rate)
           
private  void publishStocks()
           
 void run()
           
private  void sendUpdates()
           
 void stop()
          Deactivate the event source.
private  void stopThread()
           
private  void updateCache()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pageURL

java.lang.String pageURL
Here we get our stocks from.


thread

java.lang.Thread thread

active

volatile boolean active

NR_OF_STOCKS

public static final int NR_OF_STOCKS
See Also:
Constant Field Values

EMPTY

public static final java.lang.String EMPTY
See Also:
Constant Field Values

restarts

private int restarts

stocksCache

java.util.Vector stocksCache
Constructor Detail

TestEventPushSources.AEXStocksEventPushSource

public TestEventPushSources.AEXStocksEventPushSource()
Method Detail

activate

public void activate()
Activate the event source.

Specified by:
activate in interface EventSource

passivate

public void passivate()
Deactivate the event source.

Specified by:
passivate in interface EventSource

stop

public void stop()
Deactivate the event source.

Specified by:
stop in interface EventSource

run

public void run()
Specified by:
run in interface java.lang.Runnable

getStocksLine

private java.lang.String getStocksLine()

publishStocks

private void publishStocks()

publishStock

private void publishStock(int index,
                          java.lang.String name,
                          java.lang.String rate)

sendUpdates

private void sendUpdates()

stopThread

private void stopThread()

updateCache

private void updateCache()


Copyright 2000-2003 - Just Objects B.V.