Public Member Functions | |
CjdbcGuiListener (CjdbcGui gui) | |
void | handleNotification (Notification notification, Object handback) |
void | mouseClicked (MouseEvent e) |
void | mousePressed (MouseEvent e) |
void | mouseReleased (MouseEvent e) |
void | mouseEntered (MouseEvent e) |
void | mouseExited (MouseEvent e) |
void | actionPerformed (ActionEvent e) |
void | focusGained (FocusEvent e) |
void | focusLost (FocusEvent e) |
void | valueChanged (ListSelectionEvent e) |
Static Package Attributes | |
final int | JMX_SEQUENCE_CACHE = 100 |
Definition at line 62 of file CjdbcGuiListener.java.
|
Creates a new
Definition at line 79 of file CjdbcGuiListener.java. 00080 {
00081 this.gui = gui;
00082 }
|
|
Definition at line 299 of file CjdbcGuiListener.java. References org.objectweb.cjdbc.console.gui.CjdbcGui.appendDebugText(), org.objectweb.cjdbc.console.gui.CjdbcGui.getSelectedController(), org.objectweb.cjdbc.console.gui.CjdbcGui.inputBackupFrame, org.objectweb.cjdbc.console.gui.CjdbcGui.newBackendFrame, org.objectweb.cjdbc.console.gui.CjdbcGui.newControllerFrame, org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionAddController(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionAddControllerView(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionAddXmlFile(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionCleanDebugBuffer(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActioncleanLoggingPane(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionCreateBackendExecute(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadAuthenticatedDatabase(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionQuit(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionSaveConfigurationFile(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionSelectNewController(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionSelectNewDatabase(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionStartMonitor(), org.objectweb.cjdbc.console.gui.CjdbcGui.selectCheckpointFrame, and org.objectweb.cjdbc.console.gui.CjdbcGui.selectShutdownFrame. 00300 { 00301 String action = e.getActionCommand(); 00302 gui.appendDebugText("Got action:" + action); 00303 if (action.equals(GuiCommands.COMMAND_QUIT)) 00304 { 00305 gui.publicActionQuit(); 00306 } 00307 else if (action.equals(GuiCommands.COMMAND_ADD_CONTROLLER)) 00308 { 00309 gui.publicActionAddControllerView(); 00310 } 00311 else if (action.equals(GuiCommands.COMMAND_SAVE_CONFIGURATION_FILE)) 00312 { 00313 gui.publicActionSaveConfigurationFile(); 00314 } 00315 if (action.equals(GuiCommands.COMMAND_CLEAN_LOGGING_PANEL)) 00316 { 00317 gui.publicActioncleanLoggingPane(); 00318 } 00319 else if (action.equals(GuiCommands.COMMAND_ADD_CONFIG_FILE)) 00320 { 00321 gui.publicActionAddXmlFile(); 00322 } 00323 else if (action.equals(GuiCommands.COMMAND_SELECT_CONTROLLER)) 00324 { 00325 String controllerName = ((JButton) e.getSource()).getName(); 00326 gui.appendDebugText("Changed controller selection to:" + controllerName); 00327 gui.publicActionSelectNewController(controllerName); 00328 } 00329 else if (action.equals(GuiCommands.COMMAND_SELECT_DATABASE)) 00330 { 00331 DatabaseObject source = (DatabaseObject) e.getSource(); 00332 String databaseName = source.getName(); 00333 gui.appendDebugText("Changed database selection to:" + databaseName); 00334 gui.publicActionSelectNewDatabase(databaseName); 00335 } 00336 else if (action.equals(GuiCommands.COMMAND_ADD_CONTROLLER_CANCEL)) 00337 { 00338 gui.newControllerFrame.setVisible(false); 00339 } 00340 else if (action.equals(GuiCommands.COMMAND_ADD_CONTROLLER_APPROVE)) 00341 { 00342 gui.publicActionAddController(); 00343 } 00344 else if (action.equals(GuiCommands.COMMAND_SAVE_CONFIGURATION_FILE)) 00345 { 00346 gui.publicActionSaveConfigurationFile(); 00347 } 00348 else if (action.equals(GuiCommands.COMMAND_CLEAN_DEBUG_BUFFER)) 00349 { 00350 gui.publicActionCleanDebugBuffer(); 00351 } 00352 else if (action.equals(GuiCommands.COMMAND_DATABASE_AUTHENTICATE)) 00353 { 00354 gui.publicActionLoadAuthenticatedDatabase(); 00355 } 00356 else if (action.equals(GuiCommands.COMMAND_CREATE_BACKEND_APPROVE)) 00357 { 00358 gui.publicActionCreateBackendExecute(); 00359 } 00360 else if (action.equals(GuiCommands.COMMAND_CREATE_BACKEND_CANCEL)) 00361 { 00362 gui.newBackendFrame.setVisible(false); 00363 } 00364 else if (action.equals(GuiCommands.COMMAND_HIDE_CHECKPOINT_FRAME)) 00365 { 00366 gui.selectCheckpointFrame.setVisible(false); 00367 } 00368 else if (action.equals(GuiCommands.COMMAND_HIDE_SHUTDOWN_FRAME)) 00369 { 00370 gui.selectShutdownFrame.setVisible(false); 00371 } 00372 else if (action.equals(GuiCommands.COMMAND_HIDE_BACKUP_FRAME)) 00373 { 00374 gui.inputBackupFrame.setVisible(false); 00375 } 00376 else if (action.equals(GuiCommands.COMMAND_MONITOR_CURRENT_CONTROLLER)) 00377 { 00378 gui.publicActionStartMonitor(gui.getSelectedController(), true, true, 00379 true); 00380 } 00381 00382 }
|
|
Definition at line 387 of file CjdbcGuiListener.java. References org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionRefreshMBeans(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionTileJmxFrames(). 00388 {
00389 gui.publicActionTileJmxFrames(false);
00390 gui.publicActionRefreshMBeans();
00391 }
|
|
Definition at line 396 of file CjdbcGuiListener.java. 00397 { 00398 00399 }
|
|
Handle jmx notifications
Definition at line 90 of file CjdbcGuiListener.java. References org.objectweb.cjdbc.console.gui.CjdbcGui.appendDebugText(), org.objectweb.cjdbc.common.jmx.notifications.JmxNotification.getType(), and org.objectweb.cjdbc.common.jmx.notifications.JmxNotification.toString(). 00091 { 00092 String xml = (String) notification.getUserData(); 00093 // If the content of the notification is null, just debug it 00094 if (xml == null) 00095 { 00096 gui.appendDebugText("Got notification with null string"); 00097 return; 00098 } 00099 try 00100 { 00101 JmxNotification notif = JmxNotification 00102 .createNotificationFromXmlString(xml); 00103 gui.appendDebugText("----- Jmx Notification -------"); 00104 gui.appendDebugText(notif.toString()); 00105 gui.appendDebugText("-----------------------------------"); 00106 handleNotification(notif.getType(), notif); 00107 } 00108 catch (Exception e) 00109 { 00110 gui.appendDebugText("Exception while handling notification", e); 00111 } 00112 }
|
|
Definition at line 231 of file CjdbcGuiListener.java. References org.objectweb.cjdbc.console.gui.CjdbcGui.appendDebugText(), org.objectweb.cjdbc.console.gui.CjdbcGui.getAttributeChangeDialog(), org.objectweb.cjdbc.console.gui.CjdbcGui.getOperationCallDialog(), and org.objectweb.cjdbc.console.gui.CjdbcGui.mbeanList. 00232 { 00233 00234 if (e.getClickCount() <= 1) 00235 { 00236 return; 00237 } 00238 if (e.getSource() instanceof JTable) 00239 { 00240 JTable table = (JTable) e.getSource(); 00241 if (table.getName().equals(GuiConstants.TABLE_JMX_ATTRIBUTES)) 00242 { 00243 int row = table.getSelectedRow(); 00244 AttributeModel model = (AttributeModel) table.getModel(); 00245 MBeanAttributeInfo[] info = model.getInfo(); 00246 Object o = gui.mbeanList.getSelectedValue(); 00247 gui.appendDebugText("Got attribute selection for mbean:" + o 00248 + " and attribute is:" + info[row].getName()); 00249 gui.getAttributeChangeDialog((ObjectName) o, info[row]); 00250 } 00251 if (table.getName().equals(GuiConstants.TABLE_JMX_OPERATIONS)) 00252 { 00253 int row = table.getSelectedRow(); 00254 OperationModel model = (OperationModel) table.getModel(); 00255 MBeanOperationInfo[] info = model.getInfo(); 00256 Object o = gui.mbeanList.getSelectedValue(); 00257 gui.appendDebugText("Got operation selection for mbean:" + o 00258 + " and operation is:" + info[row].getName()); 00259 gui.getOperationCallDialog((ObjectName) o, info[row]); 00260 } 00261 } 00262 }
|
|
Definition at line 283 of file CjdbcGuiListener.java. 00284 { 00285 00286 }
|
|
Definition at line 291 of file CjdbcGuiListener.java. 00292 { 00293 00294 }
|
|
Definition at line 267 of file CjdbcGuiListener.java. 00268 { 00269 00270 }
|
|
Definition at line 275 of file CjdbcGuiListener.java. 00276 { 00277 00278 }
|
|
Definition at line 404 of file CjdbcGuiListener.java. References org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionRefreshMBeanAttributes(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionRefreshMBeanMethods(). 00405 { 00406 JList list = (JList) e.getSource(); 00407 ObjectName name = (ObjectName) list.getSelectedValue(); 00408 gui.publicActionRefreshMBeanAttributes(name); 00409 gui.publicActionRefreshMBeanMethods(name); 00410 }
|