use of sun.tools.jconsole.ProxyClient.SnapshotMBeanServerConnection in project jdk8u_jdk by JetBrains.
the class XMBeanAttributes method refreshAttributes.
// refreshAttributes(false) is called by tableChanged().
// in this case we must not call stopCellEditing, because it's already
// been called - e.g.
// lostFocus/mousePressed -> stopCellEditing -> setValueAt -> tableChanged
// -> refreshAttributes(false)
//
// Can be called in EDT - as long as the implementation of
// mbeansTab.getCachedMBeanServerConnection() and mbsc.flush() doesn't
// change
//
private void refreshAttributes(final boolean stopCellEditing) {
SwingWorker<Void, Void> sw = new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
SnapshotMBeanServerConnection mbsc = mbeansTab.getSnapshotMBeanServerConnection();
mbsc.flush();
return null;
}
@Override
protected void done() {
try {
get();
if (stopCellEditing)
stopCellEditing();
loadAttributes(mbean, mbeanInfo);
} catch (Exception x) {
if (JConsole.isDebug()) {
x.printStackTrace();
}
}
}
};
mbeansTab.workerAdd(sw);
}
Aggregations