public abstract class JConsolePlugin extends Object
This file contains one line for each plugin, for example,
which is the fully qualified class name of the class implementing
To load the JConsole plugins in JConsole, run:
jconsole -pluginpath <plugin-path>
where <plugin-path> specifies the paths of JConsole plugins to look up which can be a directory or a jar file. Multiple paths are separated by the path separator character of the platform.
When a new JConsole window is created for a connection,
an instance of each
JConsolePlugin will be created.
JConsoleContext object is not available at its
JConsole will set the
JConsoleContext object for
a plugin after the plugin object is created. It will then
getTabs method and add the returned
tabs to the JConsole window.
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
Dispose this plugin.
Returns the tabs to be added in JConsole window.
public final void setContext(JConsoleContext context)
JConsoleContextobject representing the connection to an application. This method will be called only once after the plugin is created and before the
getTabs()is called. The given
contextcan be in any
connection statewhen this method is called.
public final JConsoleContext getContext()
JConsoleContextobject representing the connection to an application. This method may return null if it is called before the
JConsoleContextobject representing the connection to an application.
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
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.
JPanelobject representing the tabs to be added in the JConsole window; or an empty map.
public abstract SwingWorker<?,?> newSwingWorker()
SwingWorkerto 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
method to schedule the returned
SwingWorker for execution
SwingWorker.isDonemethod returns true).
A plugin can schedule its own GUI update and this method will return null.
public void dispose()
public final void addContextPropertyChangeListener(PropertyChangeListener listener)
JConsoleContextobject for this plugin. This method is a convenient method for this plugin to register a listener when the
JConsoleContextobject may or may not be available.
For example, a plugin constructor can
call this method to register a listener to listen to the
property changes and the listener will be added to the
object when it is available.
PropertyChangeListenerto be added
public final void removeContextPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListenerfrom the listener list of the
JConsoleContextobject for this plugin. If
listenerwas never added, no exception is thrown and no action is taken.
PropertyChangeListenerto be removed
Copyright © 2006, 2016, Oracle and/or its affiliates. All rights reserved.