@Exported
public interface JConsoleContext
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.
 
| Modifier and Type | Interface and Description | 
|---|---|
| static class  | JConsoleContext.ConnectionStateValues for the ConnectionState bound property. | 
| Modifier and Type | Field and Description | 
|---|---|
| static String | CONNECTION_STATE_PROPERTYThe  ConnectionStatebound property name. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addPropertyChangeListener(PropertyChangeListener listener)Add a  PropertyChangeListenerto the listener list. | 
| JConsoleContext.ConnectionState | getConnectionState()Returns the current connection state. | 
| MBeanServerConnection | getMBeanServerConnection()Returns the  MBeanServerConnectionfor the
 connection to an application. | 
| void | removePropertyChangeListener(PropertyChangeListener listener)Removes a  PropertyChangeListenerfrom the listener list. | 
static final String CONNECTION_STATE_PROPERTY
ConnectionState bound property name.MBeanServerConnection getMBeanServerConnection()
MBeanServerConnection for the
 connection to an application.  The returned
 MBeanServerConnection object becomes invalid when
 the connection state is changed to the
 DISCONNECTED state.MBeanServerConnection for the
 connection to an application.JConsoleContext.ConnectionState getConnectionState()
void addPropertyChangeListener(PropertyChangeListener listener)
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.listener - The PropertyChangeListener to be addedvoid removePropertyChangeListener(PropertyChangeListener listener)
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.listener - the PropertyChangeListener to be removed
 Copyright © 2006, 2025, Oracle and/or its affiliates.  All rights reserved.