org.objectweb.cjdbc.console.monitoring
Class MonitoringGraph
java.lang.Object
java.lang.Thread
org.objectweb.cjdbc.console.monitoring.MonitoringGraph
- All Implemented Interfaces:
- java.lang.Runnable
- public class MonitoringGraph
- extends java.lang.Thread
Encapsulate the JFreeChart classes and methods to provide easiness of
configuration for a monitoring graph. This MonitoringGraph
also contains the thread that retrieves the information at the moment.
TODO: Should take out this Thread
so that it connects to a
monitoring repository.
- Author:
- Nicolas Modrzyk
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
collector
private AbstractDataCollector collector
chart
private org.jfree.chart.JFreeChart chart
panel
private org.jfree.chart.ChartPanel panel
series
private org.jfree.data.XYSeries series
dataset
private org.jfree.data.XYSeriesCollection dataset
jmxClient
private DataCollectorMBean jmxClient
frame
private javax.swing.JFrame frame
frameHeight
private int frameHeight
frameWidth
private int frameWidth
frequency
private long frequency
displayFrequency
private long displayFrequency
poolingSpeed
private long poolingSpeed
timeStarted
private long timeStarted
timeFrame
private int timeFrame
repeat
private long repeat
stop
private boolean stop
framed
private boolean framed
saveOnFinish
private boolean saveOnFinish
display
private boolean display
text
private java.lang.String text
displayFrequencyCount
private long displayFrequencyCount
buffer
private org.jfree.data.XYSeries buffer
MonitoringGraph
public MonitoringGraph(AbstractDataCollector collector,
DataCollectorMBean jmxClient)
- Creates a new
MonitoringGraph
object
- Parameters:
collector
- An AbstractDataCollector
objectjmxClient
- a DataCollectorJmxClient
object
display
public void display()
- Display the graph on screen
addData
public void addData(long newValue)
- Add a data entry to the current serie. Bufferize given the buffer series
size
- Parameters:
newValue
- new data to add
saveAs
public void saveAs()
throws java.io.IOException
- Save the graph into a file
- Throws:
java.io.IOException
- if an error occurs
run
public void run()
- See Also:
Runnable.run()
getCollector
public AbstractDataCollector getCollector()
- Returns:
- Returns the collector.
setCollector
public void setCollector(AbstractDataCollector collector)
- Parameters:
collector
- The collector to set.
getFrame
public javax.swing.JFrame getFrame()
- Returns:
- Returns the frame.
setFrame
public void setFrame(javax.swing.JFrame frame)
- Parameters:
frame
- The frame to set.
getFramed
public boolean getFramed()
- Returns:
- Returns the framed.
setFramed
public void setFramed(boolean framed)
- Parameters:
framed
- The framed to set.
getFrequency
public long getFrequency()
- Returns:
- Returns the frequency.
setFrequency
public void setFrequency(long frequency)
- Parameters:
frequency
- The frequency to set.
getRepeat
public long getRepeat()
- Returns:
- Returns the repeat.
setRepeat
public void setRepeat(long repeat)
- Parameters:
repeat
- The repeat to set.
getStop
public boolean getStop()
- Returns:
- Returns the stop.
setStop
public void setStop(boolean stop)
- Parameters:
stop
- The stop to set.
getTimeFrame
public int getTimeFrame()
- Returns:
- Returns the timeFrame.
setTimeFrame
public void setTimeFrame(int timeFrame)
- Parameters:
timeFrame
- The timeFrame to set.
getChart
public org.jfree.chart.JFreeChart getChart()
- Returns:
- Returns the chart.
getPanel
public org.jfree.chart.ChartPanel getPanel()
- Returns:
- Returns the panel.
getTimeStarted
public long getTimeStarted()
- Returns:
- Returns the timeStarted.
getDisplay
public boolean getDisplay()
- Returns:
- Returns the display.
setDisplay
public void setDisplay(boolean display)
- Parameters:
display
- The display to set.
getFrameHeight
public int getFrameHeight()
- Returns:
- Returns the frameHeight.
setFrameHeight
public void setFrameHeight(int frameHeight)
- Parameters:
frameHeight
- The frameHeight to set.
getFrameWidth
public int getFrameWidth()
- Returns:
- Returns the frameWidth.
setFrameWidth
public void setFrameWidth(int frameWidth)
- Parameters:
frameWidth
- The frameWidth to set.
getSaveOnFinish
public boolean getSaveOnFinish()
- Returns:
- Returns the saveOnFinish.
setSaveOnFinish
public void setSaveOnFinish(boolean saveOnFinish)
- Parameters:
saveOnFinish
- The saveOnFinish to set.
getText
public java.lang.String getText()
- Returns:
- Returns the text.
setText
public void setText(java.lang.String text)
- Parameters:
text
- The text to set.
getPoolingSpeed
public long getPoolingSpeed()
- Returns:
- Returns the poolingSpeed.
setPoolingSpeed
public void setPoolingSpeed(long poolingSpeed)
- Parameters:
poolingSpeed
- The poolingSpeed to set.
getDisplayFrequency
public long getDisplayFrequency()
- Returns:
- Returns the displayFrequency.
setDisplayFrequency
public void setDisplayFrequency(long displayFrequency)
- Parameters:
displayFrequency
- The displayFrequency to set.
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.