APIdia Launch Partner
Top Description Inners Fields Methods
com.sun.tools.jconsole

public Interface JConsoleContext

Known Direct Implementers
sun.tools.jconsole.ProxyClient
Imports
javax.management.MBeanServerConnection, java.beans.PropertyChangeListener, javax.swing.event.SwingPropertyChangeSupport

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.

Since
1.6

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
JConsoleContext.ConnectionState

Values for the ConnectionState bound property.

Field Summary

Modifier and TypeField and Description
public static final String

Method Summary

Modifier and TypeMethod and Description
public void
addPropertyChangeListener(PropertyChangeListener
The PropertyChangeListener to be added
listener
)

Add a PropertyChangeListener to the listener list.

public JConsoleContext.ConnectionState

Returns:

the current connection state.
getConnectionState
()

Returns the current connection state.

public MBeanServerConnection

Returns:

the MBeanServerConnection for the connection to an application.
getMBeanServerConnection
()

Returns the MBeanServerConnection for the connection to an application.

public void
removePropertyChangeListener(PropertyChangeListener
the PropertyChangeListener to be removed
listener
)

Removes a PropertyChangeListener from the listener list.

Field Detail

CONNECTION_STATE_PROPERTYback to summary
public static final String CONNECTION_STATE_PROPERTY

The ConnectionState bound property name.

Method Detail

addPropertyChangeListenerback to summary
public 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:PropertyChangeListener

The PropertyChangeListener to be added

getConnectionStateback to summary
public JConsoleContext.ConnectionState getConnectionState()

Returns the current connection state.

Returns:JConsoleContext.ConnectionState

the current connection state.

getMBeanServerConnectionback to summary
public 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:MBeanServerConnection

the MBeanServerConnection for the connection to an application.

removePropertyChangeListenerback to summary
public 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:PropertyChangeListener

the PropertyChangeListener to be removed

com.sun.tools.jconsole back to summary

public final Enum JConsoleContext.ConnectionState

extends Enum<JConsoleContext.ConnectionState>
Class Inheritance

Values for the ConnectionState bound property.

Field Summary

Modifier and TypeField and Description
public static final JConsoleContext.ConnectionState
CONNECTED

The connection has been successfully established.

public static final JConsoleContext.ConnectionState
CONNECTING

The connection is being attempted.

public static final JConsoleContext.ConnectionState
DISCONNECTED

No connection present.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static JConsoleContext.ConnectionState
public static JConsoleContext.ConnectionState[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CONNECTEDback to summary
public static final JConsoleContext.ConnectionState CONNECTED

The connection has been successfully established.

CONNECTINGback to summary
public static final JConsoleContext.ConnectionState CONNECTING

The connection is being attempted.

DISCONNECTEDback to summary
public static final JConsoleContext.ConnectionState DISCONNECTED

No connection present.

Constructor Detail

ConnectionStateback to summary
private ConnectionState()

Method Detail

valueOfback to summary
public static JConsoleContext.ConnectionState valueOf(String name)
valuesback to summary
public static JConsoleContext.ConnectionState[] values()