36 {@link javax.management.MBeanServer#getAttribute getAttribute} |
36 {@link javax.management.MBeanServer#getAttribute getAttribute} |
37 to retrieve the value of the attribute being monitored it does |
37 to retrieve the value of the attribute being monitored it does |
38 so within the access control context of the |
38 so within the access control context of the |
39 {@link javax.management.monitor.Monitor#start} caller.</p> |
39 {@link javax.management.monitor.Monitor#start} caller.</p> |
40 |
40 |
41 <p>The value being monitored can be a simple value contained within a |
41 <p id="complex">The value being monitored can be a simple value |
42 complex type. For example, the {@link java.lang.management.MemoryMXBean |
42 contained within a complex type. For example, the {@link |
43 MemoryMXBean} defined in <tt>java.lang.management</tt> has an attribute |
43 java.lang.management.MemoryMXBean MemoryMXBean} defined in |
44 <tt>HeapMemoryUsage</tt> of type {@link java.lang.management.MemoryUsage |
44 <tt>java.lang.management</tt> has an attribute |
45 MemoryUsage}. To monitor the amount of <i>used</i> memory, described by |
45 <tt>HeapMemoryUsage</tt> of type {@link |
46 the <tt>used</tt> property of <tt>MemoryUsage</tt>, you could monitor |
46 java.lang.management.MemoryUsage MemoryUsage}. To monitor the |
47 "<tt>HeapMemoryUsage.used</tt>". That string would be the argument to |
47 amount of <i>used</i> memory, described by the <tt>used</tt> |
48 {@link javax.management.monitor.MonitorMBean#setObservedAttribute(String) |
48 property of <tt>MemoryUsage</tt>, you could monitor |
|
49 "<tt>HeapMemoryUsage.used</tt>". That string would be the |
|
50 argument to {@link |
|
51 javax.management.monitor.MonitorMBean#setObservedAttribute(String) |
49 setObservedAttribute}.</p> |
52 setObservedAttribute}.</p> |
50 |
53 |
51 <p>The rules used to interpret an <tt>ObservedAttribute</tt> like |
54 <p>The rules used to interpret an <tt>ObservedAttribute</tt> like |
52 <tt>"HeapMemoryUsage.used"</tt> are as follows. Suppose the string is |
55 <tt>"HeapMemoryUsage.used"</tt> are as follows. Suppose the string is |
53 <i>A.e</i> (so <i>A</i> would be <tt>"HeapMemoryUsage"</tt> and <i>e</i> |
56 <i>A.e</i> (so <i>A</i> would be <tt>"HeapMemoryUsage"</tt> and <i>e</i> |