public class

ProxyClient

extends Object
implements JConsoleContext
java.lang.Object
   ↳ sun.tools.jconsole.ProxyClient

Summary

Nested Classes
class ProxyClient.Snapshot  
interface ProxyClient.SnapshotMBeanServerConnection  
[Expand]
Inherited Constants
From interface com.sun.tools.jconsole.JConsoleContext
Public Methods
void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
void addWeakPropertyChangeListener(PropertyChangeListener listener)
String connectionName()
void disconnect()
long[] findDeadlockedThreads()
AttributeList getAttributes(ObjectName name, String[] attributes)
Returns a list of attributes of a named MBean.
synchronized ClassLoadingMXBean getClassLoadingMXBean()
synchronized CompilationMXBean getCompilationMXBean()
static String getConnectionName(String url, String userName)
static String getConnectionName(LocalVirtualMachine lvm)
static String getConnectionName(String hostName, int port, String userName)
JConsoleContext.ConnectionState getConnectionState()
Returns the current connection state.
String getDisplayName()
String[] getDomains()
Returns the list of domains in which any MBean is currently registered.
synchronized Collection<GarbageCollectorMXBean> getGarbageCollectorMXBeans()
String getHostName()
synchronized HotSpotDiagnosticMXBean getHotSpotDiagnosticMXBean()
MBeanServerConnection getMBeanServerConnection()
Returns the MBeanServerConnection for the connection to an application.
Map<ObjectNameMBeanInfo> getMBeans(String domain)
Returns a map of MBeans with ObjectName as the key and MBeanInfo value of a given domain.
<T> T getMXBean(ObjectName objName, Class<T> interfaceClass)
synchronized MemoryMXBean getMemoryMXBean()
Collection<MemoryPoolProxy> getMemoryPoolProxies()
synchronized OperatingSystemMXBean getOperatingSystemMXBean()
String getPassword()
int getPort()
static ProxyClient getProxyClient(LocalVirtualMachine lvm)
Gets a proxy client for a given local virtual machine.
static ProxyClient getProxyClient(String url, String userName, String password)
Gets a proxy client for a given JMXServiceURL.
static ProxyClient getProxyClient(String hostName, int port, String userName, String password)
Gets a proxy client for a given "hostname:port".
synchronized RuntimeMXBean getRuntimeMXBean()
synchronized OperatingSystemMXBean getSunOperatingSystemMXBean()
synchronized ThreadMXBean getThreadMXBean()
String getUrl()
String getUserName()
int getVmid()
Object invoke(ObjectName name, String operationName, Object[] params, String[] signature)
Invokes an operation of a named MBean.
boolean isDead()
boolean isRegistered(ObjectName name)
boolean isSslRmiRegistry()
Returns true if the underlying RMI registry is SSL-protected.
boolean isSslRmiStub()
Returns true if the retrieved RMI stub is SSL-protected.
boolean isVmConnector()
Returns true if this ProxyClient denotes a JMX connector for a JMX VM agent.
synchronized void markAsDead()
void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list.
void setAttribute(ObjectName name, Attribute attribute)
Set the value of a specific attribute of a named MBean.
String toString()
Returns a string representation of the object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.sun.tools.jconsole.JConsoleContext

Public Methods

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 The PropertyChangeListener to be added

public void addWeakPropertyChangeListener (PropertyChangeListener listener)

public String connectionName ()

public void disconnect ()

public long[] findDeadlockedThreads ()

Throws
IOException

public AttributeList getAttributes (ObjectName name, String[] attributes)

Returns a list of attributes of a named MBean.

Throws
IOException

public synchronized ClassLoadingMXBean getClassLoadingMXBean ()

Throws
IOException

public synchronized CompilationMXBean getCompilationMXBean ()

Throws
IOException

public static String getConnectionName (String url, String userName)

public static String getConnectionName (LocalVirtualMachine lvm)

public static String getConnectionName (String hostName, int port, String userName)

public JConsoleContext.ConnectionState getConnectionState ()

Returns the current connection state.

Returns
  • the current connection state.

public String getDisplayName ()

public String[] getDomains ()

Returns the list of domains in which any MBean is currently registered.

Throws
IOException

public synchronized Collection<GarbageCollectorMXBean> getGarbageCollectorMXBeans ()

Throws
IOException

public String getHostName ()

public synchronized HotSpotDiagnosticMXBean getHotSpotDiagnosticMXBean ()

Throws
IOException

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
  • the MBeanServerConnection for the connection to an application.

public Map<ObjectNameMBeanInfo> getMBeans (String domain)

Returns a map of MBeans with ObjectName as the key and MBeanInfo value of a given domain. If domain is null, all MBeans are returned. If no MBean found, an empty map is returned.

Throws
IOException

public T getMXBean (ObjectName objName, Class<T> interfaceClass)

Throws
IOException

public synchronized MemoryMXBean getMemoryMXBean ()

Throws
IOException

public Collection<MemoryPoolProxy> getMemoryPoolProxies ()

Throws
IOException

public synchronized OperatingSystemMXBean getOperatingSystemMXBean ()

Throws
IOException

public String getPassword ()

public int getPort ()

public static ProxyClient getProxyClient (LocalVirtualMachine lvm)

Gets a proxy client for a given local virtual machine.

Throws
IOException

public static ProxyClient getProxyClient (String url, String userName, String password)

Gets a proxy client for a given JMXServiceURL.

Throws
IOException

public static ProxyClient getProxyClient (String hostName, int port, String userName, String password)

Gets a proxy client for a given "hostname:port".

Throws
IOException

public synchronized RuntimeMXBean getRuntimeMXBean ()

Throws
IOException

public synchronized OperatingSystemMXBean getSunOperatingSystemMXBean ()

Throws
IOException

public synchronized ThreadMXBean getThreadMXBean ()

Throws
IOException

public String getUrl ()

public String getUserName ()

public int getVmid ()

public Object invoke (ObjectName name, String operationName, Object[] params, String[] signature)

Invokes an operation of a named MBean.

Throws
MBeanException Wraps an exception thrown by the MBean's invoked method.
IOException

public boolean isDead ()

public boolean isRegistered (ObjectName name)

Throws
IOException

public boolean isSslRmiRegistry ()

Returns true if the underlying RMI registry is SSL-protected.

Throws
UnsupportedOperationException If this ProxyClient does not denote a JMX connector for a JMX VM agent.

public boolean isSslRmiStub ()

Returns true if the retrieved RMI stub is SSL-protected.

Throws
UnsupportedOperationException If this ProxyClient does not denote a JMX connector for a JMX VM agent.

public boolean isVmConnector ()

Returns true if this ProxyClient denotes a JMX connector for a JMX VM agent.

public synchronized void markAsDead ()

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 the PropertyChangeListener to be removed

public void setAttribute (ObjectName name, Attribute attribute)

Set the value of a specific attribute of a named MBean.

public String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
  • a string representation of the object.