APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.jvmstat.perfdata.monitor.protocol.local

public Class LocalMonitoredVm

extends AbstractMonitoredVm
Class Inheritance
Imports
java.util.*, sun.jvmstat.monitor.*, sun.jvmstat.monitor.event.*, sun.jvmstat.perfdata.monitor.*

Concrete implementation of the AbstractMonitoredVm class for the local: protocol for the HotSpot PerfData monitoring implementation.

This class provides the ability to attach to the instrumentation buffer of a live target Java Virtual Machine through a HotSpot specific attach mechanism.

Author
Brian Doherty
Since
1.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
LocalMonitoredVm.NotifierTask

Class to notify listeners of Monitor related events for the target JVM.

Field Summary

Modifier and TypeField and Description
private ArrayList<VmListener>
listeners

List of registered listeners.

private LocalMonitoredVm.NotifierTask
task

Task performing listener notification.

Inherited from sun.jvmstat.perfdata.monitor.AbstractMonitoredVm:
intervalpdbvmid

Constructor Summary

AccessConstructor and Description
public
LocalMonitoredVm(VmIdentifier
the vm identifier specifying the target JVM
vmid
,
int
the sampling interval
interval
)

Create a LocalMonitoredVm instance.

Method Summary

Modifier and TypeMethod and Description
public void
pack-priv static <T> T
public void
detach()

Overrides sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.detach.

Implements sun.jvmstat.monitor.MonitoredVm.detach.

Detach from target Java Virtual Machine.

pack-priv void
fireMonitorStatusChangedEvents(List<Monitor>
List of Monitor objects inserted.
inserted
,
List<Monitor>
List of Monitor objects removed.
removed
)

Fire MonitoredVmStructureChanged events.

pack-priv void
fireMonitorsUpdatedEvents()

Fire MonitoredUpdated events.

public void
public void
setInterval(int newInterval)

Overrides sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.setInterval.

Implements sun.jvmstat.monitor.MonitoredVm.setInterval.

Set the polling interval to interval milliseconds.

Inherited from sun.jvmstat.perfdata.monitor.AbstractMonitoredVm:
clearLastExceptionfindByNamefindByPatterngetBytesgetCapacitygetIntervalgetLastExceptiongetMonitorStatusgetVmIdentifierisErroredsetLastException

Field Detail

listenersback to summary
private ArrayList<VmListener> listeners

List of registered listeners.

taskback to summary
private LocalMonitoredVm.NotifierTask task

Task performing listener notification.

Constructor Detail

LocalMonitoredVmback to summary
public LocalMonitoredVm(VmIdentifier vmid, int interval) throws MonitorException

Create a LocalMonitoredVm instance.

Parameters
vmid:VmIdentifier

the vm identifier specifying the target JVM

interval:int

the sampling interval

Method Detail

addVmListenerback to summary
public void addVmListener(VmListener l)

Implements abstract sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.addVmListener.

Implements sun.jvmstat.monitor.MonitoredVm.addVmListener.

Doc from sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.addVmListener.

Add a VmListener. The given listener is added to the list of VmListener objects to be notified of MonitoredVm related events..

castback to summary
pack-priv static <T> T cast(Object x)
Annotations
@SuppressWarnings:unchecked
detachback to summary
public void detach()

Overrides sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.detach.

Implements sun.jvmstat.monitor.MonitoredVm.detach.

Doc from sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.detach.

Detach from target Java Virtual Machine. After calling this method, updates of the instrumentation data values may be halted. All event notifications are halted. Further interactions with this object should be avoided..

fireMonitorStatusChangedEventsback to summary
pack-priv void fireMonitorStatusChangedEvents(List<Monitor> inserted, List<Monitor> removed)

Fire MonitoredVmStructureChanged events.

Parameters
inserted:List<Monitor>

List of Monitor objects inserted.

removed:List<Monitor>

List of Monitor objects removed.

Annotations
@SuppressWarnings:unchecked
fireMonitorsUpdatedEventsback to summary
pack-priv void fireMonitorsUpdatedEvents()

Fire MonitoredUpdated events.

removeVmListenerback to summary
public void removeVmListener(VmListener l)

Implements abstract sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.removeVmListener.

Implements sun.jvmstat.monitor.MonitoredVm.removeVmListener.

Doc from sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.removeVmListener.

Remove a VmListener. The given listener is removed from the list of VmListener objects to be notified of MonitoredVm related events..

setIntervalback to summary
public void setInterval(int newInterval)

Overrides sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.setInterval.

Implements sun.jvmstat.monitor.MonitoredVm.setInterval.

Doc from sun.jvmstat.perfdata.monitor.AbstractMonitoredVm.setInterval.

Set the polling interval to interval milliseconds. Polling based monitoring implementations need to refresh the instrumentation data on a periodic basis. This interface allows the interval to override the implementation specific default interval..

sun.jvmstat.perfdata.monitor.protocol.local back to summary

private Class LocalMonitoredVm.NotifierTask

extends CountedTimerTask
Class Inheritance

Class to notify listeners of Monitor related events for the target JVM.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
run()

Overrides sun.jvmstat.perfdata.monitor.CountedTimerTask.run.

Implements java.lang.Runnable.run.

The action to be performed by this timer task.

Inherited from sun.jvmstat.perfdata.monitor.CountedTimerTask:
executionCount

Constructor Detail

NotifierTaskback to summary
private NotifierTask()

Method Detail

runback to summary
public void run()

Overrides sun.jvmstat.perfdata.monitor.CountedTimerTask.run.

Implements java.lang.Runnable.run.

Doc from java.util.TimerTask.run.

The action to be performed by this timer task.