-
public interface JConsoleContextJConsoleContextrepresents a JConsole connection to a target application.JConsoleContextnotifies anyPropertyChangeListenersabout the ConnectionState property change toCONNECTEDandDISCONNECTED. TheJConsoleContextinstance will be the source for any generated events.- Since:
- 1.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classJConsoleContext.ConnectionStateValues for the ConnectionState bound property.
-
Field Summary
Fields Modifier and Type Field Description static StringCONNECTION_STATE_PROPERTYTheConnectionStatebound property name.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPropertyChangeListener(PropertyChangeListener listener)Add aPropertyChangeListenerto the listener list.JConsoleContext.ConnectionStategetConnectionState()Returns the current connection state.MBeanServerConnectiongetMBeanServerConnection()Returns theMBeanServerConnectionfor the connection to an application.voidremovePropertyChangeListener(PropertyChangeListener listener)Removes aPropertyChangeListenerfrom the listener list.
-
-
-
Field Detail
-
CONNECTION_STATE_PROPERTY
static final String CONNECTION_STATE_PROPERTY
TheConnectionStatebound property name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getMBeanServerConnection
MBeanServerConnection getMBeanServerConnection()
Returns theMBeanServerConnectionfor the connection to an application. The returnedMBeanServerConnectionobject becomes invalid when the connection state is changed to theDISCONNECTEDstate.- Returns:
- the
MBeanServerConnectionfor the connection to an application.
-
getConnectionState
JConsoleContext.ConnectionState getConnectionState()
Returns the current connection state.- Returns:
- the current connection state.
-
addPropertyChangeListener
void addPropertyChangeListener(PropertyChangeListener listener)
Add aPropertyChangeListenerto 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. Iflistenerisnull, no exception is thrown and no action is taken.- Parameters:
listener- ThePropertyChangeListenerto be added
-
removePropertyChangeListener
void removePropertyChangeListener(PropertyChangeListener listener)
Removes aPropertyChangeListenerfrom the listener list. This removes aPropertyChangeListenerthat was registered for all properties. Iflistenerwas added more than once to the same event source, it will be notified one less time after being removed. Iflistenerisnull, or was never added, no exception is thrown and no action is taken.- Parameters:
listener- thePropertyChangeListenerto be removed
-
-