org.objectweb.cjdbc.console.monitoring
Class MonitoringConsole
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.objectweb.cjdbc.console.monitoring.MonitoringConsole
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants, java.awt.event.WindowListener
- public class MonitoringConsole
- extends javax.swing.JFrame
- implements java.awt.event.MouseListener, java.awt.event.ActionListener, java.awt.event.WindowListener
New Monitoring Console bootstrap for starting stopping monitoring graphs
- Version:
- 1.0
- Author:
- Nicolas Modrzyk , Emmanuel Cecchet
- See Also:
- Serialized Form
Nested classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Window |
|
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
private void |
closeAllWindows()
|
private void |
doLoadConfiguration()
|
private void |
doSaveConfiguration()
|
private void |
error(java.lang.String message)
|
static java.lang.String |
getBackendActionCommand(java.lang.String typeName,
java.lang.String vdbName,
java.lang.String backendName)
Get the backend action command for displaying monitoring window |
private javax.swing.JComponent |
getGraphMenuItem(int type,
java.lang.String virtualDbName,
java.lang.String targetName)
|
private javax.swing.JLabel |
getHeaderLabel(java.lang.String text)
|
private javax.swing.JLabel |
getSubHeaderLabel(java.lang.String text)
|
private javax.swing.JFrame |
graph(java.lang.String command)
Starts a new graph |
static javax.swing.JFrame |
graph(java.lang.String command,
DataCollectorMBean dataCollectorMBean,
int graphRepeat,
int graphTimeframe,
int graphFrequency,
int graphDisplayFrequency,
java.awt.event.WindowListener listener)
Starts a graph ! |
private void |
initConsole()
|
private javax.swing.JToolBar |
initializaBackendBar(java.lang.String vdb,
java.lang.String backendName)
|
private javax.swing.JToolBar |
initializaDatabaseBar(boolean dispBackends)
|
private javax.swing.JToolBar |
initializeCacheBar(java.lang.String vdb)
|
private javax.swing.JToolBar |
initializeControllerBar()
|
private javax.swing.JToolBar |
initializeSchedulerBar(java.lang.String vdb)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
private void |
status(java.lang.String message)
|
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
frameWidth
private int frameWidth
frameHeight
private int frameHeight
label
private javax.swing.JLabel label
jScroll
private javax.swing.JScrollPane jScroll
controllerMBean
private ControllerMBean controllerMBean
virtualDatabaseMBean
private VirtualDatabaseMBean virtualDatabaseMBean
dataCollectorMBean
private DataCollectorMBean dataCollectorMBean
GRAPH_CONTROLLER
private static final java.lang.String GRAPH_CONTROLLER
GRAPH_VIRTUAL_DATABASE
private static final java.lang.String GRAPH_VIRTUAL_DATABASE
GRAPH_CACHE
private static final java.lang.String GRAPH_CACHE
GRAPH_SCHEDULER
private static final java.lang.String GRAPH_SCHEDULER
GRAPH_BACKENDS
private static final java.lang.String GRAPH_BACKENDS
windows
private java.util.Hashtable windows
comboBoxesItems
private java.util.Vector comboBoxesItems
comboBoxes
private java.util.Hashtable comboBoxes
boxFont
private java.awt.Font boxFont
labelFont
private java.awt.Font labelFont
headerFont
private java.awt.Font headerFont
toolBarColor
private java.awt.Color toolBarColor
graphRepeat
private int graphRepeat
graphTimeframe
private int graphTimeframe
graphFrequency
private int graphFrequency
graphDisplayFrequency
private int graphDisplayFrequency
COMMAND_SAVE
private static final java.lang.String COMMAND_SAVE
COMMAND_LOAD
private static final java.lang.String COMMAND_LOAD
COMMAND_CLOSE_GRAPHS
private static final java.lang.String COMMAND_CLOSE_GRAPHS
COMMAND_OPTIONS
private static final java.lang.String COMMAND_OPTIONS
COMMAND_CLOSE
private static final java.lang.String COMMAND_CLOSE
COMMAND_REFRESH
private static final java.lang.String COMMAND_REFRESH
OPTIONS_APPLY
private static final java.lang.String OPTIONS_APPLY
- See Also:
- Constant Field Values
OPTIONS_CANCEL
private static final java.lang.String OPTIONS_CANCEL
- See Also:
- Constant Field Values
COMBO_HIDE
private static final java.lang.String COMBO_HIDE
COMBO_FLOATING
private static final java.lang.String COMBO_FLOATING
isLoading
private boolean isLoading
options
private javax.swing.JFrame options
ftimeframe
private javax.swing.JTextField ftimeframe
ffrequency
private javax.swing.JTextField ffrequency
frepeat
private javax.swing.JTextField frepeat
displayBuffer
private javax.swing.JTextField displayBuffer
displayController
private boolean displayController
displayVirtualDatabase
private boolean displayVirtualDatabase
displayBackends
private boolean displayBackends
MonitoringConsole
public MonitoringConsole(java.lang.String jmxUrl,
ControllerMBean controllerMBean,
VirtualDatabaseMBean virtualDatabaseMBean,
boolean backends)
throws java.io.IOException
- Creates a new
MonitoringConsole
object
- Parameters:
jmxUrl
- JMX URLcontrollerMBean
- controller MBean if controller monitoring must be
activatedvirtualDatabaseMBean
- virtual database MBean if virtual database
monitoring must be activatedbackends
- display backends monitoring menu
- Throws:
java.io.IOException
- if an error occurs
initConsole
private void initConsole()
throws java.lang.Exception
- Throws:
java.lang.Exception
getHeaderLabel
private javax.swing.JLabel getHeaderLabel(java.lang.String text)
getSubHeaderLabel
private javax.swing.JLabel getSubHeaderLabel(java.lang.String text)
initializeControllerBar
private javax.swing.JToolBar initializeControllerBar()
initializeCacheBar
private javax.swing.JToolBar initializeCacheBar(java.lang.String vdb)
initializeSchedulerBar
private javax.swing.JToolBar initializeSchedulerBar(java.lang.String vdb)
initializaBackendBar
private javax.swing.JToolBar initializaBackendBar(java.lang.String vdb,
java.lang.String backendName)
initializaDatabaseBar
private javax.swing.JToolBar initializaDatabaseBar(boolean dispBackends)
throws java.lang.Exception
- Throws:
java.lang.Exception
getGraphMenuItem
private javax.swing.JComponent getGraphMenuItem(int type,
java.lang.String virtualDbName,
java.lang.String targetName)
getBackendActionCommand
public static java.lang.String getBackendActionCommand(java.lang.String typeName,
java.lang.String vdbName,
java.lang.String backendName)
- Get the backend action command for displaying monitoring window
- Parameters:
typeName
- type of info to monitorvdbName
- database namebackendName
- backend name
- Returns:
String
describing the command
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
in interface java.awt.event.MouseListener
- See Also:
MouseListener.mouseClicked(java.awt.event.MouseEvent)
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered
in interface java.awt.event.MouseListener
- See Also:
MouseListener.mouseEntered(java.awt.event.MouseEvent)
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited
in interface java.awt.event.MouseListener
- See Also:
MouseListener.mouseExited(java.awt.event.MouseEvent)
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interface java.awt.event.MouseListener
- See Also:
MouseListener.mousePressed(java.awt.event.MouseEvent)
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interface java.awt.event.MouseListener
- See Also:
MouseListener.mouseReleased(java.awt.event.MouseEvent)
doSaveConfiguration
private void doSaveConfiguration()
throws java.io.IOException
- Throws:
java.io.IOException
doLoadConfiguration
private void doLoadConfiguration()
throws java.io.IOException
- Throws:
java.io.IOException
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
- See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)
closeAllWindows
private void closeAllWindows()
status
private void status(java.lang.String message)
error
private void error(java.lang.String message)
graph
private javax.swing.JFrame graph(java.lang.String command)
throws DataCollectorException
- Starts a new graph
- Parameters:
command
- command line
- Throws:
DataCollectorException
- if fails
graph
public static final javax.swing.JFrame graph(java.lang.String command,
DataCollectorMBean dataCollectorMBean,
int graphRepeat,
int graphTimeframe,
int graphFrequency,
int graphDisplayFrequency,
java.awt.event.WindowListener listener)
throws DataCollectorException
- Starts a graph !
- Parameters:
command
- graph commanddataCollectorMBean
- jmx client to get info fromgraphRepeat
- parametergraphTimeframe
- parametergraphFrequency
- parametergraphDisplayFrequency
- parameterlistener
- to receive updates
- Returns:
JFrame
containing the monitoring window
- Throws:
DataCollectorException
- if an error occurs
windowActivated
public void windowActivated(java.awt.event.WindowEvent e)
- Specified by:
windowActivated
in interface java.awt.event.WindowListener
- See Also:
WindowListener.windowActivated(java.awt.event.WindowEvent)
windowClosed
public void windowClosed(java.awt.event.WindowEvent e)
- Specified by:
windowClosed
in interface java.awt.event.WindowListener
- See Also:
WindowListener.windowClosed(java.awt.event.WindowEvent)
windowClosing
public void windowClosing(java.awt.event.WindowEvent e)
- Specified by:
windowClosing
in interface java.awt.event.WindowListener
- See Also:
WindowListener.windowClosing(java.awt.event.WindowEvent)
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent e)
- Specified by:
windowDeactivated
in interface java.awt.event.WindowListener
- See Also:
WindowListener.windowDeactivated(java.awt.event.WindowEvent)
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent e)
- Specified by:
windowDeiconified
in interface java.awt.event.WindowListener
- See Also:
WindowListener.windowDeiconified(java.awt.event.WindowEvent)
windowIconified
public void windowIconified(java.awt.event.WindowEvent e)
- Specified by:
windowIconified
in interface java.awt.event.WindowListener
- See Also:
WindowListener.windowIconified(java.awt.event.WindowEvent)
windowOpened
public void windowOpened(java.awt.event.WindowEvent e)
- Specified by:
windowOpened
in interface java.awt.event.WindowListener
- See Also:
WindowListener.windowOpened(java.awt.event.WindowEvent)
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.