Class ChartingProvider

java.lang.Object
com.caplin.charting.ChartingProvider

public class ChartingProvider extends Object
The ChartingProvider provides an integration point to allow you to plug in a provider of historic chart data.

It should be instantiated like so:

 DataSource dataSource = new DataSource(commandLineArgs);
 ChartDataProvider dataProvider = new YourClassImplementingChartDataProviderGoesHere();
 ChartingProvider chartingProvider = new ChartingProvider(dataSource, dataProvider);
 dataSource.start();
 
The subject prefix that this provider listens for is specified by the chart-objectname-prefix configuration variable inside the datasource.conf file:
 Example:
 
 chart-objectname-prefix /CHARTS/
 
 

the default chart-objectname-prefix value is /CHARTS/

Subjects of the following form are parsed:

 
 /CHARTS/Subject?interval=1d&start=1308327222&end=1308327222&cached=true
  
  where
  
 /CHARTS/Subject        is the subject (with the /CHARTS/ default prefix)
    interval=1d       represents an interval of 1 day
    start=1308327222  is the start time in seconds since midnight, January 1, 1970 UTC
    end=1308327222    is the end time
    cached=true       indicates cached data
 
  • Constructor Details

    • ChartingProvider

      public ChartingProvider(com.caplin.datasource.DataSource dataSource, ChartDataProvider chartDataProvider)
      Constructs a new ChartingProvider.
      Parameters:
      dataSource - a caplin DataSource.
      chartDataProvider - an object that provides historic chart data. This would be written to integrate with a specific service.