|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.watch.Watch
public class Watch
The Watch provides a mechanism to collect information and associate it to a WatchDataSource
| Field Summary | |
|---|---|
protected static String |
COMPONENT
Use for configuration and logger |
static String |
DEFAULT_VIEW
Default View class |
protected String |
id
The identifier for this watch. |
protected WatchDataSourceImpl |
localRef
The WatchDataSourceImpl, this may be null if not created by the Watch |
protected static Logger |
logger
A Logger |
protected WatchDataSource |
watchDataSource
The WatchDataSource associated with this Watch. |
| Constructor Summary | |
|---|---|
Watch(String id)
Creates new Watch, creates and exports a WatchDataSourceImpl |
|
Watch(String id,
Configuration config)
Creates a new Watch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided |
|
Watch(WatchDataSource watchDataSource,
String id)
Creates new Watch |
|
| Method Summary | |
|---|---|
void |
addWatchRecord(Calculable calc)
Add a watch record to the history |
void |
clear()
Clear the collected values |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
TabularData |
getCalculables()
Get all collected Calculable values as TabularData |
String |
getId()
Getter for property id. |
double |
getLastCalculableValue()
Get the last Calculable as a CompositeData object |
String |
getView()
Get the view for the Watch |
WatchDataSource |
getWatchDataSource()
Getter for property watchDataSource. |
int |
hashCode()
Returns a hash code value for the object. |
static void |
main(String[] args)
|
void |
setView(String viewClass)
Set the view for the Watch |
void |
setWatchDataSource(WatchDataSource wds)
Sets the WatchDataSource for the Watch. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected WatchDataSource watchDataSource
protected String id
protected WatchDataSourceImpl localRef
protected static final String COMPONENT
protected static final Logger logger
public static final String DEFAULT_VIEW
| Constructor Detail |
|---|
public Watch(String id)
id - The identifier for this watch
public Watch(String id,
Configuration config)
id - The identifier for this watchconfig - Configuration object used for constructing a
WatchDataSource
public Watch(WatchDataSource watchDataSource,
String id)
id - the identifier for this watchwatchDataSource - the watch data source associated with this watch| Method Detail |
|---|
public WatchDataSource getWatchDataSource()
public void setWatchDataSource(WatchDataSource wds)
wds - The new WatchDataSource. The WatchDataSource will
have the id, configuration and view properties injected, and will also
be initialized.public String getView()
public void setView(String viewClass)
viewClass - Fully qualified classname, suitable for use with
Class.forName(), of the class to use to visualize the Watchpublic String getId()
WatchMBean
getId in interface WatchMBeanWatchMBean.getId()public double getLastCalculableValue()
WatchMBean
getLastCalculableValue in interface WatchMBeanWatchMBean.getLastCalculableValue()public TabularData getCalculables()
WatchMBean
getCalculables in interface WatchMBeanWatchMBean.getCalculables()public void clear()
WatchMBean
clear in interface WatchMBeanWatchMBean.clear()public void addWatchRecord(Calculable calc)
calc - the Calculable record to be addedpublic boolean equals(Object obj)
equals in class Objectobj - the object to compare to this one
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic static void main(String[] args)
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||