org.objectweb.cjdbc.console.gui
Class CjdbcGui

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended byjavax.swing.JFrame
                      extended byorg.objectweb.cjdbc.console.gui.CjdbcGui
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class CjdbcGui
extends javax.swing.JFrame

This class is the main class for the graphical version of the C-JDBC administration console.

Version:
1.0
Author:
Nicolas Modrzyk , Emmanuel Cecchet
See Also:
Serialized Form

Nested Class Summary
 
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
 
Field Summary
(package private)  javax.swing.JInternalFrame attributeFrame
           
(package private)  javax.swing.JScrollPane attributePane
           
(package private)  javax.swing.JTable attributeTable
           
(package private)  javax.swing.JPanel backendButtons
          Panels for the backend panel
(package private)  javax.swing.JPanel backendIcons
          Panels for the backend panel
(package private)  java.util.Hashtable backendList
          List of backends [backendName] : [BackendObject]
(package private)  javax.swing.JPanel backendPanel
          Backend pane
(package private)  java.util.Hashtable backendsState
          Hastable of backends states: [StateName] / [Panel]
(package private)  BackendTransferListener backendTransferListener
          Backend transfer listener used for drag and drop
(package private)  javax.swing.JTabbedPane centerPane
          The center Pane
(package private)  javax.swing.JFileChooser configurationFileChooser
          the file chooser for configuration files
(package private)  ControllerTransferListener configurationFileTransferListener
          Configuration File transfer listener used for drag and drop
(package private)  java.util.Hashtable controllerList
          List of controllers [controllerName] : [ControllerObject]
(package private)  javax.swing.JPanel controllerListPanel
          Panel for controller list
(package private)  ControllerListPopUpMenu controllerListPopUpMenu
          The controller list mouse listener
(package private)  java.util.Hashtable controllerMBeans
          Controller MBeans [URL] / [ControllerJmxClient]
(package private)  java.lang.Object credentials
           
(package private)  RmiJmxClient currentJmxClient
           
(package private)  java.util.Hashtable databaseList
          List of databases [databaseName] : [DatabaseObject]
(package private)  java.util.Hashtable databaseMBeans
          Virtual database MBeans [DatabaseName] / [VirtualDatabaseJmxClient]
(package private)  javax.swing.JScrollPane debugScroll
          Scroll panel for selection in center pane
(package private)  java.lang.String debugText
          The texts of the debug,logging panel
(package private)  javax.swing.JTextArea debugTextPane
          The debug panel itself
(package private)  javax.swing.JTextArea debugTraceTextPane
          The panel for exceptions tracing
(package private)  GuiExceptionFrame exceptionFrame
          Exception frame for reporting errors from the server
(package private)  javax.swing.JPanel fileListPanel
          The list containing the xml file NAMES, no paths
(package private)  javax.swing.JScrollPane fileScroll
          Scroll panels from the left pane
(package private)  CjdbcGuiListener guiActionListener
          GuiAction listener
(package private)  GuiSession guiSession
          Stored values for session
(package private)  javax.swing.JScrollPane helpScroll
          Scroll panel for selection in center pane
(package private)  javax.swing.JScrollPane infoScroll
          Scroll panel for selection in center pane
(package private)  javax.swing.JTextPane infoTextPane
          The log panel itself
(package private)  GuiInputBackupFrame inputBackupFrame
          Select backup frame
(package private)  javax.swing.JFileChooser jarFileChooser
          the file chooser for jar files
(package private)  java.util.Hashtable jmxClients
          List of jmx clients [url] : [RmiJmxClient]
(package private)  javax.swing.JDesktopPane jmxPanel
           
(package private)  javax.swing.JScrollPane jmxScroll
           
(package private)  javax.swing.JScrollPane logConfigScroll
          Scroll panel for selection in center pane
(package private)  javax.swing.JTextPane logConfigTextPane
          The panel for the log4j configuration
(package private)  javax.swing.JScrollPane loggingScroll
          Scroll panel for selection in center pane
(package private)  java.lang.String loggingText
          The texts of the debug,logging panel
(package private)  javax.swing.JTextArea loggingTextPane
          The debug panel itself
(package private)  GuiLoggingThread logginThread
          The thread that connects to the log4j server on a host
(package private)  GuiVirtualDatabaseLoginFrame loginFrame
          Login frame
(package private)  javax.swing.JInternalFrame mbeanFrame
           
(package private)  JNewList mbeanList
           
(package private)  NewBackendFrame newBackendFrame
          New Backend frame object
(package private)  GuiNewControllerFrame newControllerFrame
          New controller frame objects
(package private)  javax.swing.JInternalFrame operationFrame
           
(package private)  javax.swing.JScrollPane operationPane
           
(package private)  javax.swing.JTable operationTable
           
(package private)  GuiParsingThread parsingThread
          The thread that parse the xml panel
(package private)  javax.swing.JFileChooser saveFileChooser
          the save file chooser for files
(package private)  GuiSelectCheckpointFrame selectCheckpointFrame
          Select checkpoint frame
(package private)  java.lang.String selectedController
           
(package private)  java.lang.String selectedDatabase
           
(package private)  GuiSelectShutdownFrame selectShutdownFrame
          Select shutdown frame
(package private)  JTextAreaWriter traceWriter
          Writer to the trace exception area in the backend panel
(package private)  javax.swing.JPanel vdbListPanel
          The panel for the list of databases
(package private)  javax.swing.JScrollPane xmlScroll
          Scroll panel for selection in center pane
(package private)  javax.swing.JTextPane xmlTextPane
          The xml editor panel
 
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
 
Constructor Summary
CjdbcGui()
          Creates a new CjdbcGui.java object
 
Method Summary
private  void actionAddObjectToGridLayout(javax.swing.JPanel panel, javax.swing.JButton button)
           
 void actionChangeBackendState(BackendObject bo, java.lang.String newState)
          Change the state of a backend object Checks the new state is valid, and then display the backend object into the new panel.
private  java.lang.String actionConvertState(java.lang.String jmxState)
          Converts a JMX state to a Gui constants values
private  boolean actionDisplayConfirmFrame(java.lang.String message)
          Display frame to confirm action
private  java.lang.String actionDisplayInputBackupFrame(java.lang.String database, java.lang.String backend)
          Display the dump input frame
private  java.lang.String actionDisplaySelectCheckpointFrame(java.lang.String database)
           
private  ControllerMBean actionGetControllerBean(java.lang.String controllerName)
           
private  VirtualDatabaseMBean actionGetDatabaseBean(java.lang.String databaseName)
           
 void actionLoadBackend(java.lang.String database, java.lang.String backendName, java.lang.String controllerName, boolean enable)
          Create a new database backend object and load its state
 void actionLoadBackendActionButton(java.lang.String name)
          Load a panel for the backends
 void actionLoadBackendPane(boolean recoveryEnabled)
          Load standard version for the panel
private  java.util.ArrayList actionLoadCheckpointNames(java.lang.String databaseName)
           
private  void actionLoadController(java.lang.String name)
          Load a new controller, the graphic object, the connection state and add it to the controller pane list.
private  void actionLoadDatabase(java.lang.String databaseName, java.lang.String controllerName)
           
private  void actionLoadDatabaseList(java.lang.String controllerName)
           
(package private)  void actionLoadXmlList()
           
(package private)  java.lang.String actionLoadXmlText(java.io.File filePath)
           
private  void actionRefreshBackendState(BackendObject bob)
           
private  java.lang.String actionReplaceInConfiguration(java.lang.String logConfiguration, java.lang.String oldMode, java.lang.String newMode)
           
 void actionSetBackendState(java.lang.String backendName)
          Set the state of the given backend.
 void actionSetBackendState(java.lang.String backendName, java.lang.String newState)
          Change panel of backend
private  void actionStartControllerLoggingThread(java.lang.String controllerName)
           
(package private)  void actionUnloadBackends(java.lang.String controller)
           
 void appendDebugText(java.lang.String text)
          Append debug text to the debug panel
 void appendDebugText(java.lang.String text, java.lang.Exception e)
          Same as above and displays the stack trace ...
private  java.lang.String generateCheckpoint(java.lang.String backendName)
          Generate a checkpoint name from the given backend and the current date.
 void getAttributeChangeDialog(javax.management.ObjectName name, javax.management.MBeanAttributeInfo info)
          Opens a window t ochange an attribute
 java.util.Hashtable getBackendList()
          Returns the backendList value.
 RmiJmxClient getCurrentJmxClient()
          Returns the currentJmxClient value.
 CjdbcGuiListener getGuiActionListener()
          Get the action listener for the gui
 GuiSession getGuiSession()
          Returns the guiSession value.
 java.util.Hashtable getJmxClients()
          Returns the jmxClients value.
 void getOperationCallDialog(javax.management.ObjectName name, javax.management.MBeanOperationInfo info)
          Opens a window to perform a jmx operation
 java.lang.String getSelectedController()
          Returns the selectedController value.
private  boolean isDropInSameColumn(java.lang.String actionName, java.lang.String backendName)
          Check if the target column and the current state are the same
 void paintBackendPane()
          Validate and Repaint the backend split
(package private)  void paintConfigurationPane()
           
(package private)  void paintControllerPane()
          Paint the controller panel
(package private)  void paintDatabasePanel()
           
 void publicActionAddController()
          add a Controller to the list.
 void publicActionAddControllerView()
          View the controller frame to add a new controller reference to the list
 void publicActionAddXmlFile()
          Show the file chooser to add an xml file to the configuration list
 void publicActionBackupBackendPrompt(BackendObject bob)
          Execute a backup of the given backend
 void publicActionCleanDebugBuffer()
          Clean the debug buffer
 void publicActioncleanLoggingPane()
          Clean the content of the logging text pane and repaint
 void publicActionControllerLogConfiguration(java.lang.String controllerName)
          Load the controller log4j configuration file in the info buffer
 void publicActionControllerRemove(java.lang.String controllerName)
          Removes a controller from the gui
 void publicActionControllerReport(java.lang.String controllerName)
          Get a report for the given controller
 void publicActionCreateBackendExecute()
          Create the new backend by sending the jmx command
 void publicActionDatabaseDisableAll(java.lang.String databaseName)
          actionDatabaseDisableAll definition.
 void publicActionDatabaseEnableAll(java.lang.String databaseName)
          actionDatabaseEnableAll definition.
 void publicActionDeleteDump(java.lang.String databaseName, DumpFileObject dump)
          Delete a dump of a database from the virtual database
 void publicActionDisplayShutdownFrame(DatabaseObject database)
          Display the shutdown dialog and then shutdown the database with the corresponding level
 void publicActionExecuteBackendDrop(javax.swing.JButton target, java.lang.String backendName)
          Execute the backend drop action with this gui
 void publicActionExecuteBackendDrop(javax.swing.JPanel panel, java.lang.String backendName)
          Execute the backend drop action with this gui
 void publicActionExecuteBackendDrop(java.lang.String actionName, java.lang.String backendName)
          Execute the backend drop action with this gui
 void publicActionExecuteControllerDrop(java.lang.String filePath, java.lang.String controllerName)
          Load a configuration file on a controller
 void publicActionExecuteTransfer(java.lang.String backendName, java.lang.String controllerName)
          Execute a backend transfer from one controller to an other one
 void publicActionGetControllerInfo(java.lang.String controllerName)
          GetInfo for the given controller
 void publicActionLoadAuthenticatedDatabase()
          Load the virtual database after authentication.
 void publicActionLoadBackendsList(java.lang.String databaseName)
          Load the list of backends for the given database
 void publicActionLoadControllerList()
          Load the controller list.
 void publicActionLoadDriver(java.lang.String controllerName)
          Add a new driver to the controller.
 void publicActionLoadDumpList(java.lang.String databaseName)
          Loads the graphic dump list for this databaser
 void publicActionLoadXmlController(java.lang.String connectUrl)
          Load the xml for the given controller Gives the focus to the xml panel with the new content
 void publicActionLoadXmlDatabase(java.lang.String databaseName)
          Load the xml configuration of the given database and display the xml buffer
 void publicActionNewBackendPrompt(BackendObject bob)
          Open the frame to fill in details to create a new backend
 void publicActionQuit()
          Quit the GUI
 void publicActionRefreshCursorShape()
          Set the cursor to be a hand
 void publicActionRefreshLogs(java.lang.String controllerName)
          Fetch the logs from the controller
 void publicActionRefreshMBeanAttributes(javax.management.ObjectName mbean)
          Refresh MBean attributes.
 void publicActionRefreshMBeanMethods(javax.management.ObjectName mbean)
          Refresh MBean methods.
 void publicActionRefreshMBeans()
          Refresh the list of mbeans
 void publicActionRemoveBackend(BackendObject bo)
          Remove a backend from the backend list, and from the controller
 void publicActionRemoveBackendFromGui(java.lang.String backendName)
          Remove the backend graphic object from the gui
 void publicActionRemoveBackendFromGui(java.lang.String backendName, java.lang.String controller)
          Performs checks before calling publicActionRemoveBackendFromGui
 void publicActionRemoveConfigurationFile(ConfigurationFileObject cfo)
          Remove a configuration file from the list
 void publicActionRestoreBackend(java.lang.String backendName, java.lang.String dumpName)
          Restore a backend from a dump file
 void publicActionSaveConfigurationFile()
          saveConfigurationFile definition.
 void publicActionSelectNewConfigurationFile(java.lang.String file)
          Select a new configuration load the content of the xml file into the xmlTextPane panel
 void publicActionSelectNewController(java.lang.String connectUrl)
          Action when a new controller has been selected
 void publicActionSelectNewDatabase(java.lang.String value)
          Select a new database action
 void publicActionSetCheckpoint(BackendObject bo)
          Set the checkpoint of a backend
 void publicActionSetLogConfigurationDebug(java.lang.String controllerName, java.lang.String logConfiguration)
          Change the log4j configuration to Debug mode for all loggers
 void publicActionSetLogConfigurationInfo(java.lang.String controllerName, java.lang.String logConfiguration)
          Change the log4j configuration to Info mode for all loggers
 void publicActionSetLogConfigurationServer(boolean enableServer, java.lang.String controllerName, java.lang.String logConfiguration)
          Add/remove log4j server output
 void publicActionShutdownController(java.lang.String controllerName)
          Shutdown the given controller
 void publicActionShutdownDatabase(DatabaseObject dob, int shutdownLevel)
          Send a shutdown command to the corresponding database
 void publicActionStartMonitor(java.lang.String controllerName, boolean displayController, boolean displayVdb, boolean displayBackends)
          Start monitoring console.
 void publicActionTestBackendConnection(BackendObject bo)
          Test jdbc connection on this backend
 void publicActionTileJmxFrames(boolean vertical)
          Position the jmx frames on the desktop
 void publicActionUnSetCheckpoint(BackendObject bo)
          Unset checkpoint of a backend (set it to null)
 void publicActionUpdateControllerLogConfiguration(java.lang.String controllerName, java.lang.String newContent)
          Update the controller log4j configuration file, and restart the logger thread
 void publicActionViewCache(java.lang.String databaseName)
          Display the cache content in a new frame
 void publicActionViewCacheStats(java.lang.String databaseName)
          Display the cache stats
 void publicActionViewRecoveryLog(java.lang.String databaseName)
          Display the content of the recovery log in a frame
 void publicActionViewSQLStats(java.lang.String databaseName)
          Display the SQL stats
private  byte[] readDriver(java.lang.String filename)
           
 void setCurrentJmxClient(RmiJmxClient currentJmxClient)
          Sets the currentJmxClient value.
 
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
 

Field Detail

guiSession

GuiSession guiSession
Stored values for session


databaseMBeans

java.util.Hashtable databaseMBeans
Virtual database MBeans [DatabaseName] / [VirtualDatabaseJmxClient]


controllerMBeans

java.util.Hashtable controllerMBeans
Controller MBeans [URL] / [ControllerJmxClient]


backendsState

java.util.Hashtable backendsState
Hastable of backends states: [StateName] / [Panel]


backendList

java.util.Hashtable backendList
List of backends [backendName] : [BackendObject]


databaseList

java.util.Hashtable databaseList
List of databases [databaseName] : [DatabaseObject]


controllerList

java.util.Hashtable controllerList
List of controllers [controllerName] : [ControllerObject]


jmxClients

java.util.Hashtable jmxClients
List of jmx clients [url] : [RmiJmxClient]


currentJmxClient

RmiJmxClient currentJmxClient

selectedController

java.lang.String selectedController

selectedDatabase

java.lang.String selectedDatabase

credentials

java.lang.Object credentials

mbeanList

JNewList mbeanList

logginThread

GuiLoggingThread logginThread
The thread that connects to the log4j server on a host


vdbListPanel

javax.swing.JPanel vdbListPanel
The panel for the list of databases


fileListPanel

javax.swing.JPanel fileListPanel
The list containing the xml file NAMES, no paths


controllerListPanel

javax.swing.JPanel controllerListPanel
Panel for controller list


loginFrame

GuiVirtualDatabaseLoginFrame loginFrame
Login frame


newControllerFrame

GuiNewControllerFrame newControllerFrame
New controller frame objects


exceptionFrame

GuiExceptionFrame exceptionFrame
Exception frame for reporting errors from the server


newBackendFrame

NewBackendFrame newBackendFrame
New Backend frame object


selectCheckpointFrame

GuiSelectCheckpointFrame selectCheckpointFrame
Select checkpoint frame


selectShutdownFrame

GuiSelectShutdownFrame selectShutdownFrame
Select shutdown frame


inputBackupFrame

GuiInputBackupFrame inputBackupFrame
Select backup frame


backendTransferListener

BackendTransferListener backendTransferListener
Backend transfer listener used for drag and drop


configurationFileTransferListener

ControllerTransferListener configurationFileTransferListener
Configuration File transfer listener used for drag and drop


guiActionListener

CjdbcGuiListener guiActionListener
GuiAction listener


debugText

java.lang.String debugText
The texts of the debug,logging panel


loggingText

java.lang.String loggingText
The texts of the debug,logging panel


debugTextPane

javax.swing.JTextArea debugTextPane
The debug panel itself


loggingTextPane

javax.swing.JTextArea loggingTextPane
The debug panel itself


infoTextPane

javax.swing.JTextPane infoTextPane
The log panel itself


parsingThread

GuiParsingThread parsingThread
The thread that parse the xml panel


xmlTextPane

javax.swing.JTextPane xmlTextPane
The xml editor panel


configurationFileChooser

javax.swing.JFileChooser configurationFileChooser
the file chooser for configuration files


jarFileChooser

javax.swing.JFileChooser jarFileChooser
the file chooser for jar files


saveFileChooser

javax.swing.JFileChooser saveFileChooser
the save file chooser for files


backendPanel

javax.swing.JPanel backendPanel
Backend pane


controllerListPopUpMenu

ControllerListPopUpMenu controllerListPopUpMenu
The controller list mouse listener


centerPane

javax.swing.JTabbedPane centerPane
The center Pane


helpScroll

javax.swing.JScrollPane helpScroll
Scroll panel for selection in center pane


debugScroll

javax.swing.JScrollPane debugScroll
Scroll panel for selection in center pane


xmlScroll

javax.swing.JScrollPane xmlScroll
Scroll panel for selection in center pane


loggingScroll

javax.swing.JScrollPane loggingScroll
Scroll panel for selection in center pane


infoScroll

javax.swing.JScrollPane infoScroll
Scroll panel for selection in center pane


logConfigScroll

javax.swing.JScrollPane logConfigScroll
Scroll panel for selection in center pane


fileScroll

javax.swing.JScrollPane fileScroll
Scroll panels from the left pane


debugTraceTextPane

javax.swing.JTextArea debugTraceTextPane
The panel for exceptions tracing


traceWriter

JTextAreaWriter traceWriter
Writer to the trace exception area in the backend panel


logConfigTextPane

javax.swing.JTextPane logConfigTextPane
The panel for the log4j configuration


backendButtons

javax.swing.JPanel backendButtons
Panels for the backend panel


backendIcons

javax.swing.JPanel backendIcons
Panels for the backend panel


jmxPanel

javax.swing.JDesktopPane jmxPanel

jmxScroll

javax.swing.JScrollPane jmxScroll

attributePane

javax.swing.JScrollPane attributePane

attributeTable

javax.swing.JTable attributeTable

operationTable

javax.swing.JTable operationTable

operationPane

javax.swing.JScrollPane operationPane

mbeanFrame

javax.swing.JInternalFrame mbeanFrame

attributeFrame

javax.swing.JInternalFrame attributeFrame

operationFrame

javax.swing.JInternalFrame operationFrame
Constructor Detail

CjdbcGui

public CjdbcGui()
Creates a new CjdbcGui.java object

Method Detail

actionGetControllerBean

private ControllerMBean actionGetControllerBean(java.lang.String controllerName)

actionStartControllerLoggingThread

private void actionStartControllerLoggingThread(java.lang.String controllerName)

actionGetDatabaseBean

private VirtualDatabaseMBean actionGetDatabaseBean(java.lang.String databaseName)

actionLoadDatabaseList

private void actionLoadDatabaseList(java.lang.String controllerName)

actionUnloadBackends

void actionUnloadBackends(java.lang.String controller)

paintDatabasePanel

void paintDatabasePanel()

actionLoadDatabase

private void actionLoadDatabase(java.lang.String databaseName,
                                java.lang.String controllerName)

actionAddObjectToGridLayout

private void actionAddObjectToGridLayout(javax.swing.JPanel panel,
                                         javax.swing.JButton button)

publicActionLoadBackendsList

public void publicActionLoadBackendsList(java.lang.String databaseName)
Load the list of backends for the given database

Parameters:
databaseName - the database to load the backends from

actionLoadBackend

public void actionLoadBackend(java.lang.String database,
                              java.lang.String backendName,
                              java.lang.String controllerName,
                              boolean enable)
Create a new database backend object and load its state

Parameters:
database - the virtual database name
backendName - the backend name
controllerName - the controller that owns this backend
enable - if the backend object should be enabled. (not used?)

actionConvertState

private java.lang.String actionConvertState(java.lang.String jmxState)
Converts a JMX state to a Gui constants values

Parameters:
jmxState - the JMX state to convert
Returns:
the GUI constant value or null if not found
See Also:
GuiConstants

actionChangeBackendState

public void actionChangeBackendState(BackendObject bo,
                                     java.lang.String newState)
Change the state of a backend object Checks the new state is valid, and then display the backend object into the new panel. Removes it from the old panel as well. Calls repaint of each panel. This is not connected to the actual database the backend object is referenced from because many states do not exist on the controller

Parameters:
bo - the backend object
newState - new state to assign to the backend

actionSetBackendState

public void actionSetBackendState(java.lang.String backendName)
Set the state of the given backend. The state is retrieved via a jmx call on the backend corresponding MBean.

Parameters:
backendName - the backend to set the state

actionSetBackendState

public void actionSetBackendState(java.lang.String backendName,
                                  java.lang.String newState)
Change panel of backend

Parameters:
backendName - name of backend
newState - new state

paintBackendPane

public void paintBackendPane()
Validate and Repaint the backend split


paintConfigurationPane

void paintConfigurationPane()

actionLoadXmlText

java.lang.String actionLoadXmlText(java.io.File filePath)

appendDebugText

public void appendDebugText(java.lang.String text)
Append debug text to the debug panel

Parameters:
text - to append

appendDebugText

public void appendDebugText(java.lang.String text,
                            java.lang.Exception e)
Same as above and displays the stack trace ...

Parameters:
text - text to display
e - the exception to get the trace from

publicActionAddXmlFile

public void publicActionAddXmlFile()
Show the file chooser to add an xml file to the configuration list


actionLoadXmlList

void actionLoadXmlList()

actionLoadCheckpointNames

private java.util.ArrayList actionLoadCheckpointNames(java.lang.String databaseName)

publicActionLoadControllerList

public void publicActionLoadControllerList()
Load the controller list. Removes all the controller icons from the panel. and get all the controllers from the session hashtable Then calls actionLoadController


paintControllerPane

void paintControllerPane()
Paint the controller panel


publicActionAddControllerView

public void publicActionAddControllerView()
View the controller frame to add a new controller reference to the list


publicActionDatabaseEnableAll

public void publicActionDatabaseEnableAll(java.lang.String databaseName)
actionDatabaseEnableAll definition. Call the proper MBean to enable all backends

Parameters:
databaseName - the name of the database to operate

actionLoadBackendActionButton

public void actionLoadBackendActionButton(java.lang.String name)
Load a panel for the backends

Parameters:
name - the name of the panel

actionLoadBackendPane

public void actionLoadBackendPane(boolean recoveryEnabled)
Load standard version for the panel

Parameters:
recoveryEnabled - more options are available when recovery log is enabled for the database

publicActionLoadAuthenticatedDatabase

public void publicActionLoadAuthenticatedDatabase()
Load the virtual database after authentication.


publicActionQuit

public void publicActionQuit()
Quit the GUI


publicActionLoadDriver

public void publicActionLoadDriver(java.lang.String controllerName)
Add a new driver to the controller. Start the file chooser and use the proper MBean

Parameters:
controllerName - name of the controller

readDriver

private byte[] readDriver(java.lang.String filename)
                   throws java.io.FileNotFoundException,
                          java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

publicActionRefreshLogs

public void publicActionRefreshLogs(java.lang.String controllerName)
Fetch the logs from the controller

Parameters:
controllerName - the name of the controller

publicActionCleanDebugBuffer

public void publicActionCleanDebugBuffer()
Clean the debug buffer


publicActionSaveConfigurationFile

public void publicActionSaveConfigurationFile()
saveConfigurationFile definition. Starts the JFile Chooser and write the xml content to the selected file


publicActionAddController

public void publicActionAddController()
add a Controller to the list.


actionLoadController

private void actionLoadController(java.lang.String name)
Load a new controller, the graphic object, the connection state and add it to the controller pane list.

Parameters:
name - the name(url) of the controller

publicActionSelectNewController

public void publicActionSelectNewController(java.lang.String connectUrl)
Action when a new controller has been selected

Parameters:
connectUrl - the url of the controller that was selected

getSelectedController

public java.lang.String getSelectedController()
Returns the selectedController value.

Returns:
Returns the selectedController.

publicActionLoadDumpList

public void publicActionLoadDumpList(java.lang.String databaseName)
Loads the graphic dump list for this databaser

Parameters:
databaseName - the virtual database name

publicActionLoadXmlController

public void publicActionLoadXmlController(java.lang.String connectUrl)
Load the xml for the given controller Gives the focus to the xml panel with the new content

Parameters:
connectUrl - controllerName

publicActionSelectNewDatabase

public void publicActionSelectNewDatabase(java.lang.String value)
Select a new database action

Parameters:
value - the name of the virtual dababase

publicActionLoadXmlDatabase

public void publicActionLoadXmlDatabase(java.lang.String databaseName)
Load the xml configuration of the given database and display the xml buffer

Parameters:
databaseName - virtual database name to get configuration from

publicActionSelectNewConfigurationFile

public void publicActionSelectNewConfigurationFile(java.lang.String file)
Select a new configuration load the content of the xml file into the xmlTextPane panel

Parameters:
file - the path to the xml file

publicActionShutdownDatabase

public void publicActionShutdownDatabase(DatabaseObject dob,
                                         int shutdownLevel)
Send a shutdown command to the corresponding database

Parameters:
dob - database object representing the database to shutdown
shutdownLevel - the level to apply for the shutdown

publicActionExecuteBackendDrop

public void publicActionExecuteBackendDrop(javax.swing.JButton target,
                                           java.lang.String backendName)
Execute the backend drop action with this gui

Parameters:
backendName - name of the backend
target - the drop target used for the Dnd

actionDisplaySelectCheckpointFrame

private java.lang.String actionDisplaySelectCheckpointFrame(java.lang.String database)

isDropInSameColumn

private boolean isDropInSameColumn(java.lang.String actionName,
                                   java.lang.String backendName)
Check if the target column and the current state are the same

Parameters:
actionName - the action from the DnD
backendName - the name of the backend that is the target of the action
Returns:
true if nothing has changed

publicActionExecuteBackendDrop

public void publicActionExecuteBackendDrop(java.lang.String actionName,
                                           java.lang.String backendName)
Execute the backend drop action with this gui

Parameters:
actionName - action name on the backend
backendName - the drop target used for the Dnd

actionRefreshBackendState

private void actionRefreshBackendState(BackendObject bob)

generateCheckpoint

private java.lang.String generateCheckpoint(java.lang.String backendName)
Generate a checkpoint name from the given backend and the current date.

Parameters:
backendName - the backend to generate a checkpoint for
Returns:
backend name concat date

publicActionNewBackendPrompt

public void publicActionNewBackendPrompt(BackendObject bob)
Open the frame to fill in details to create a new backend

Parameters:
bob - the backend to replicate

publicActionRestoreBackend

public void publicActionRestoreBackend(java.lang.String backendName,
                                       java.lang.String dumpName)
Restore a backend from a dump file

Parameters:
backendName - name of the backend
dumpName - name of the dump file

publicActionBackupBackendPrompt

public void publicActionBackupBackendPrompt(BackendObject bob)
Execute a backup of the given backend

Parameters:
bob - the backend object

actionDisplayInputBackupFrame

private java.lang.String actionDisplayInputBackupFrame(java.lang.String database,
                                                       java.lang.String backend)
Display the dump input frame

Parameters:
database - virtual database to dump
backend - backend to dump
Returns:
dump name

publicActionRefreshCursorShape

public void publicActionRefreshCursorShape()
Set the cursor to be a hand


publicActionExecuteControllerDrop

public void publicActionExecuteControllerDrop(java.lang.String filePath,
                                              java.lang.String controllerName)
Load a configuration file on a controller

Parameters:
filePath - the configuration file
controllerName - the name of the controller

publicActionDatabaseDisableAll

public void publicActionDatabaseDisableAll(java.lang.String databaseName)
actionDatabaseDisableAll definition. Call the proper MBean to disable all backends

Parameters:
databaseName - virtual database name

publicActionGetControllerInfo

public void publicActionGetControllerInfo(java.lang.String controllerName)
GetInfo for the given controller

Parameters:
controllerName - the controllerName

publicActionShutdownController

public void publicActionShutdownController(java.lang.String controllerName)
Shutdown the given controller

Parameters:
controllerName - name of the controller to shutdown

publicActionControllerReport

public void publicActionControllerReport(java.lang.String controllerName)
Get a report for the given controller

Parameters:
controllerName - the controller to get the report from

publicActionDeleteDump

public void publicActionDeleteDump(java.lang.String databaseName,
                                   DumpFileObject dump)
Delete a dump of a database from the virtual database

Parameters:
databaseName - the url of the controller
dump - the dump object

actionDisplayConfirmFrame

private boolean actionDisplayConfirmFrame(java.lang.String message)
Display frame to confirm action

Parameters:
message - message to confirm
Returns:
true if YES is selected, false otherwise

publicActionExecuteBackendDrop

public void publicActionExecuteBackendDrop(javax.swing.JPanel panel,
                                           java.lang.String backendName)
Execute the backend drop action with this gui

Parameters:
panel - the target of the drop
backendName - name of the backend that is the target of the drop

publicActionControllerLogConfiguration

public void publicActionControllerLogConfiguration(java.lang.String controllerName)
Load the controller log4j configuration file in the info buffer

Parameters:
controllerName - the controller's url

publicActionUpdateControllerLogConfiguration

public void publicActionUpdateControllerLogConfiguration(java.lang.String controllerName,
                                                         java.lang.String newContent)
Update the controller log4j configuration file, and restart the logger thread

Parameters:
controllerName - the controller's url
newContent - the new log4j configuration

publicActionSetLogConfigurationDebug

public void publicActionSetLogConfigurationDebug(java.lang.String controllerName,
                                                 java.lang.String logConfiguration)
Change the log4j configuration to Debug mode for all loggers

Parameters:
controllerName - the name of the controller of this configuration
logConfiguration - the content as a String of the log4j configuration

publicActionSetLogConfigurationServer

public void publicActionSetLogConfigurationServer(boolean enableServer,
                                                  java.lang.String controllerName,
                                                  java.lang.String logConfiguration)
Add/remove log4j server output

Parameters:
enableServer - true to enable
controllerName - of the controller for this configuration
logConfiguration - logFile name

actionReplaceInConfiguration

private java.lang.String actionReplaceInConfiguration(java.lang.String logConfiguration,
                                                      java.lang.String oldMode,
                                                      java.lang.String newMode)
                                               throws java.io.IOException
Throws:
java.io.IOException

publicActionSetLogConfigurationInfo

public void publicActionSetLogConfigurationInfo(java.lang.String controllerName,
                                                java.lang.String logConfiguration)
Change the log4j configuration to Info mode for all loggers

Parameters:
controllerName - the name of the controller of this configuration
logConfiguration - the content as a String of the log4j configuration

getBackendList

public java.util.Hashtable getBackendList()
Returns the backendList value.

Returns:
Returns the backendList.

publicActioncleanLoggingPane

public void publicActioncleanLoggingPane()
Clean the content of the logging text pane and repaint


publicActionRemoveConfigurationFile

public void publicActionRemoveConfigurationFile(ConfigurationFileObject cfo)
Remove a configuration file from the list

Parameters:
cfo - the file object associated

publicActionControllerRemove

public void publicActionControllerRemove(java.lang.String controllerName)
Removes a controller from the gui

Parameters:
controllerName - the name of the controller

publicActionStartMonitor

public void publicActionStartMonitor(java.lang.String controllerName,
                                     boolean displayController,
                                     boolean displayVdb,
                                     boolean displayBackends)
Start monitoring console.

Parameters:
controllerName - the controller to monitor
displayController - true if controller pane should be displayed
displayVdb - true if virtual database pane should be displayed
displayBackends - true if backend pane should be displayed

publicActionCreateBackendExecute

public void publicActionCreateBackendExecute()
Create the new backend by sending the jmx command


publicActionViewCache

public void publicActionViewCache(java.lang.String databaseName)
Display the cache content in a new frame

Parameters:
databaseName - database name that contains the cache

publicActionViewSQLStats

public void publicActionViewSQLStats(java.lang.String databaseName)
Display the SQL stats

Parameters:
databaseName - virtual database name

publicActionViewCacheStats

public void publicActionViewCacheStats(java.lang.String databaseName)
Display the cache stats

Parameters:
databaseName - virtual database name

getGuiActionListener

public CjdbcGuiListener getGuiActionListener()
Get the action listener for the gui

Returns:
the listener of events

getGuiSession

public GuiSession getGuiSession()
Returns the guiSession value.

Returns:
Returns the guiSession.

getJmxClients

public java.util.Hashtable getJmxClients()
Returns the jmxClients value.

Returns:
Returns the jmxClients.

publicActionRemoveBackendFromGui

public void publicActionRemoveBackendFromGui(java.lang.String backendName)
Remove the backend graphic object from the gui

Parameters:
backendName - the backend to remove

publicActionRemoveBackend

public void publicActionRemoveBackend(BackendObject bo)
Remove a backend from the backend list, and from the controller

Parameters:
bo - the BackendObject that originated the action

publicActionExecuteTransfer

public void publicActionExecuteTransfer(java.lang.String backendName,
                                        java.lang.String controllerName)
Execute a backend transfer from one controller to an other one

Parameters:
backendName - the name of the backend to transfer
controllerName - the target controller to transfer to

publicActionRemoveBackendFromGui

public void publicActionRemoveBackendFromGui(java.lang.String backendName,
                                             java.lang.String controller)
Performs checks before calling publicActionRemoveBackendFromGui

Parameters:
backendName - the backend name to remove
controller - the controller that it was removed from

publicActionDisplayShutdownFrame

public void publicActionDisplayShutdownFrame(DatabaseObject database)
Display the shutdown dialog and then shutdown the database with the corresponding level

Parameters:
database - the database name we want to shutdown.

publicActionViewRecoveryLog

public void publicActionViewRecoveryLog(java.lang.String databaseName)
Display the content of the recovery log in a frame

Parameters:
databaseName - the database that containts the recovery log we want

publicActionSetCheckpoint

public void publicActionSetCheckpoint(BackendObject bo)
Set the checkpoint of a backend

Parameters:
bo - the backend to change the checkpoint

publicActionUnSetCheckpoint

public void publicActionUnSetCheckpoint(BackendObject bo)
Unset checkpoint of a backend (set it to null)

Parameters:
bo - backend object

publicActionTestBackendConnection

public void publicActionTestBackendConnection(BackendObject bo)
Test jdbc connection on this backend

Parameters:
bo - the backend object to test the connection on

publicActionRefreshMBeans

public void publicActionRefreshMBeans()
Refresh the list of mbeans


publicActionTileJmxFrames

public void publicActionTileJmxFrames(boolean vertical)
Position the jmx frames on the desktop

Parameters:
vertical - tile the frames vertically if true, horizontally if false

publicActionRefreshMBeanAttributes

public void publicActionRefreshMBeanAttributes(javax.management.ObjectName mbean)
Refresh MBean attributes.

Parameters:
mbean - the MBean to refresh

publicActionRefreshMBeanMethods

public void publicActionRefreshMBeanMethods(javax.management.ObjectName mbean)
Refresh MBean methods.

Parameters:
mbean - the MBean to refresh

getCurrentJmxClient

public RmiJmxClient getCurrentJmxClient()
Returns the currentJmxClient value.

Returns:
Returns the currentJmxClient.

setCurrentJmxClient

public void setCurrentJmxClient(RmiJmxClient currentJmxClient)
Sets the currentJmxClient value.

Parameters:
currentJmxClient - The currentJmxClient to set.

getOperationCallDialog

public void getOperationCallDialog(javax.management.ObjectName name,
                                   javax.management.MBeanOperationInfo info)
Opens a window to perform a jmx operation

Parameters:
info - an MBeanOperationInfo object
name - name of the JMX object

getAttributeChangeDialog

public void getAttributeChangeDialog(javax.management.ObjectName name,
                                     javax.management.MBeanAttributeInfo info)
Opens a window t ochange an attribute

Parameters:
info - an MBeanOperationInfo object
name - name of the JMX object


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.