Venice 0.7beta

org.mov.quote
Class QuoteSourceManager

java.lang.Object
  extended by org.mov.quote.QuoteSourceManager

public class QuoteSourceManager
extends java.lang.Object

Returns the singleton reference to the quote source that the user has selected in their preferences. This class will also be updated when the user preferences has changed so the return quote source will always be update to date. Example:

        List quotes = QuoteSourceManager.getSource().getQuotesForSymbol("CBA");
 

Author:
Andrew Leppard
See Also:
QuoteSource

Method Summary
static void flush()
          The user has changed their quote source preferences, flush singleton reference and create new instance.
static QuoteSource getSource()
          Creates and returns singleton instance of quote source which user has selected in the Preferences->Quote Source page.
static void setSource(QuoteSource source)
          Set the quote source to be the given quote source.
static void shutdown()
          Shutdown the quote source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setSource

public static void setSource(QuoteSource source)
Set the quote source to be the given quote source. This function was written for import. During import we set the quote source to be the source source for the import. Then after the import we flush the source and let it return to whatever the user selected.

Parameters:
source - the new quote source

flush

public static void flush()
The user has changed their quote source preferences, flush singleton reference and create new instance.


shutdown

public static void shutdown()
Shutdown the quote source. Some quote sources require a shut down operation to ensure that they are properly closed.


getSource

public static QuoteSource getSource()
Creates and returns singleton instance of quote source which user has selected in the Preferences->Quote Source page.

Returns:
quote source

Venice 0.7beta