APIdia Launch Partner
Top Description Fields Constructors Methods
sun.tools.jconsole

pack-priv final Class ExceptionSafePlugin

extends JConsolePlugin
Class Inheritance
Imports
java.util.HashMap, .Map, javax.swing.JOptionPane, .JPanel, .SwingWorker, com.sun.tools.jconsole.JConsolePlugin

Proxy that shields GUI from plug-in exceptions.

Field Summary

Modifier and TypeField and Description
private static boolean
private final JConsolePlugin

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Overrides com.sun.tools.jconsole.JConsolePlugin.dispose.

Dispose this plugin.

public void
public Map<String, JPanel>
getTabs()

Implements abstract com.sun.tools.jconsole.JConsolePlugin.getTabs.

Returns the tabs to be added in JConsole window.

private void
public SwingWorker<?, ?>
newSwingWorker()

Implements abstract com.sun.tools.jconsole.JConsolePlugin.newSwingWorker.

Returns a SwingWorker to perform the GUI update for this plugin at the same interval as JConsole updates the GUI.

private void
Inherited from com.sun.tools.jconsole.JConsolePlugin:
addContextPropertyChangeListenergetContextremoveContextPropertyChangeListenersetContext

Field Detail

ignoreExceptionsback to summary
private static boolean ignoreExceptions
pluginback to summary
private final JConsolePlugin plugin

Constructor Detail

ExceptionSafePluginback to summary
public ExceptionSafePlugin(JConsolePlugin plugin)

Method Detail

disposeback to summary
public void dispose()

Overrides com.sun.tools.jconsole.JConsolePlugin.dispose.

Doc from com.sun.tools.jconsole.JConsolePlugin.dispose.

Dispose this plugin. This method is called by JConsole to inform that this plugin will be discarded and that it should free any resources that it has allocated. The JConsoleContext can be in any connection state when this method is called.

Annotations
@Override
executeSwingWorkerback to summary
public void executeSwingWorker(SwingWorker<?, ?> sw)
getTabsback to summary
public Map<String, JPanel> getTabs()

Implements abstract com.sun.tools.jconsole.JConsolePlugin.getTabs.

Doc from com.sun.tools.jconsole.JConsolePlugin.getTabs.

Returns the tabs to be added in JConsole window.

The returned map contains one entry for each tab to be added in the tabbed pane in a JConsole window with the tab name as the key and the JPanel object as the value. This method returns an empty map if no tab is added by this plugin. This method will be called from the Event Dispatch Thread once at the new connection time.

Annotations
@Override
handleExceptionback to summary
private void handleException(Exception e)
newSwingWorkerback to summary
public SwingWorker<?, ?> newSwingWorker()

Implements abstract com.sun.tools.jconsole.JConsolePlugin.newSwingWorker.

Doc from com.sun.tools.jconsole.JConsolePlugin.newSwingWorker.

Returns a SwingWorker to perform the GUI update for this plugin at the same interval as JConsole updates the GUI.

JConsole schedules the GUI update at an interval specified for a connection. This method will be called at every update to obtain a SwingWorker for each plugin.

JConsole will invoke the execute() method to schedule the returned SwingWorker for execution if:

  • the SwingWorker object has not been executed (i.e. the SwingWorker#getState method returns PENDING state); and
  • the SwingWorker object returned in the previous update has completed the task if it was not null (i.e. the SwingWorker.isDone method returns true).

Otherwise, SwingWorker object will not be scheduled to work.

A plugin can schedule its own GUI update and this method will return null.

Annotations
@Override
showExceptionDialogback to summary
private void showExceptionDialog(Exception e)