|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cafesip.gwtcomp.server.SimpleLiveDataSource
public class SimpleLiveDataSource
This class implements a simple live data source that can be used for demonstration purposes.
| Nested Class Summary | |
|---|---|
static class |
SimpleLiveDataSource.LiveDataStrategy
Enumerates the data-generation strategy. |
| Constructor Summary | |
|---|---|
SimpleLiveDataSource()
A constructor for this class. |
|
| Method Summary | |
|---|---|
void |
close(Principal user,
HttpSession session,
LiveDataSessionInfo sessionData)
This method is invoked by the LiveDataServiceImpl servlet
to information the data source that the session is closed. |
ChartInitData |
getChartInfoAndInitialData(Principal user,
HttpSession session,
LiveDataSessionInfo sessionData)
This method is invoked by the LiveDataServiceImpl servlet when the
chart is intialized at the client-side. |
ChartData |
getNextData(Principal user,
HttpSession session,
LiveDataSessionInfo sessionData)
This method is invoked by the LiveDataServiceImpl servlet
periodically to retrieve data that is used to refresh the live data
panel. |
int |
getNumSeries()
|
double |
getRangeBottom()
|
double |
getRangeTop()
|
long |
getRefreshInterval()
|
String[] |
getSeriesNames()
|
SimpleLiveDataSource.LiveDataStrategy |
getStrategy()
|
String |
getTitle()
|
void |
setBottomRange(double rangeBottom)
|
void |
setNumSeries(int numSeries)
|
void |
setRangeTop(double rangeTop)
|
void |
setRefreshInterval(long refreshInterval)
|
void |
setSeriesNames(String[] seriesNames)
|
void |
setStrategy(SimpleLiveDataSource.LiveDataStrategy strategy)
|
void |
setTitle(String title)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleLiveDataSource()
| Method Detail |
|---|
public ChartInitData getChartInfoAndInitialData(Principal user,
HttpSession session,
LiveDataSessionInfo sessionData)
LiveDataSourceLiveDataServiceImpl servlet when the
chart is intialized at the client-side. The method must return a
ChartInitData object that specifies the property of the chart and the
initial data. The client-side of the application displays the chart and
the data accordingly.
getChartInfoAndInitialData in interface LiveDataSourceuser - the user who is displaying the live data panel. The parameter
has a null value of the user has not been authenticated by the
servlet container.session - the HTTPSession object is passed so that you application can
use session-scope variables to maintain states.sessionData - Session data.
public ChartData getNextData(Principal user,
HttpSession session,
LiveDataSessionInfo sessionData)
LiveDataSourceLiveDataServiceImpl servlet
periodically to retrieve data that is used to refresh the live data
panel. The method returns the ChartData object that contains the data.
getNextData in interface LiveDataSourceuser - the user who is displaying the live data panel. The parameter
has a null value of the user has not been authenticated by the
servlet container.session - the HTTPSession object is passed so that you application can
use session-scope variables to maintain states.sessionData - Information on the session.
public SimpleLiveDataSource.LiveDataStrategy getStrategy()
public void setStrategy(SimpleLiveDataSource.LiveDataStrategy strategy)
strategy - The strategy to set.public int getNumSeries()
public void setNumSeries(int numSeries)
numSeries - The numSeries to set.public double getRangeTop()
public void setRangeTop(double rangeTop)
rangeTop - The rangeTop to set.public double getRangeBottom()
public void setBottomRange(double rangeBottom)
rangeBottom - The rangeBottom to set.public String[] getSeriesNames()
public void setSeriesNames(String[] seriesNames)
seriesNames - The seriesNames to set.public String getTitle()
public void setTitle(String title)
title - The title to set.public long getRefreshInterval()
public void setRefreshInterval(long refreshInterval)
refreshInterval - The refreshInterval to set.
public void close(Principal user,
HttpSession session,
LiveDataSessionInfo sessionData)
LiveDataSourceLiveDataServiceImpl servlet
to information the data source that the session is closed. This
gives the application a chance to perform cleanup.
close in interface LiveDataSourceuser - the user who is displaying the live data panel. The parameter
has a null value of the user has not been authenticated by the
servlet container.session - the HTTPSession object is passed so that you application can
use session-scope variables to maintain states.sessionData - Information on the session.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||