public interface

JConsoleContext

com.sun.tools.jconsole.JConsoleContext
Known Indirect Subclasses

Class Overview

JConsoleContext represents a JConsole connection to a target application.

JConsoleContext notifies any PropertyChangeListeners about the ConnectionState property change to CONNECTED and DISCONNECTED. The JConsoleContext instance will be the source for any generated events.

Summary

Nested Classes
enum JConsoleContext.ConnectionState Values for the ConnectionState bound property. 
Constants
String CONNECTION_STATE_PROPERTY The ConnectionState bound property name.
Public Methods
abstract void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
abstract JConsoleContext.ConnectionState getConnectionState()
Returns the current connection state.
abstract MBeanServerConnection getMBeanServerConnection()
Returns the MBeanServerConnection for the connection to an application.
abstract void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list.

Constants

public static final String CONNECTION_STATE_PROPERTY

The ConnectionState bound property name.

Constant Value: "connectionState"

Public Methods

public abstract void addPropertyChangeListener (PropertyChangeListener listener)

Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. If listener is null, no exception is thrown and no action is taken.

Parameters
listener The PropertyChangeListener to be added

public abstract JConsoleContext.ConnectionState getConnectionState ()

Returns the current connection state.

Returns
  • the current connection state.

public abstract MBeanServerConnection getMBeanServerConnection ()

Returns the MBeanServerConnection for the connection to an application. The returned MBeanServerConnection object becomes invalid when the connection state is changed to the DISCONNECTED state.

Returns
  • the MBeanServerConnection for the connection to an application.

public abstract void removePropertyChangeListener (PropertyChangeListener listener)

Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. If listener was added more than once to the same event source, it will be notified one less time after being removed. If listener is null, or was never added, no exception is thrown and no action is taken.

Parameters
listener the PropertyChangeListener to be removed