Module jdk.management
Package com.ibm.lang.management.internal
Class ExtendedOperatingSystemMXBeanImpl
- java.lang.Object
-
- com.ibm.java.lang.management.internal.OperatingSystemMXBeanImpl
-
- com.ibm.lang.management.internal.ExtendedOperatingSystemMXBeanImpl
-
- All Implemented Interfaces:
OperatingSystemMXBean
,OperatingSystemMXBean
,OperatingSystemMXBean
,PlatformManagedObject
,NotificationBroadcaster
,NotificationEmitter
- Direct Known Subclasses:
UnixExtendedOperatingSystem
public class ExtendedOperatingSystemMXBeanImpl extends com.ibm.java.lang.management.internal.OperatingSystemMXBeanImpl implements OperatingSystemMXBean
Runtime type forOperatingSystemMXBean
.- Since:
- 1.7.1
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
Adds a listener to this MBean.String
getHardwareModel()
Retrieve hardware modelstatic ExtendedOperatingSystemMXBeanImpl
getInstance()
Singleton accessor method.MBeanNotificationInfo[]
getNotificationInfo()
Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.void
removeNotificationListener(NotificationListener listener)
Removes a listener from this MBean.void
removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
Removes a listener from this MBean.void
sendNotification(Notification notification)
Send notifications to registered listeners.-
Methods declared in class com.ibm.java.lang.management.internal.OperatingSystemMXBeanImpl
getArch, getAvailableProcessors, getName, getObjectName, getSystemLoadAverage, getVersion
-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface com.ibm.lang.management.OperatingSystemMXBean
getCommittedVirtualMemorySize, getFreeSwapSpaceSize, getProcessCpuLoad, getProcessCpuTime, getProcessCpuTimeByNS, getProcessingCapacity, getProcessPhysicalMemorySize, getProcessPrivateMemorySize, getProcessVirtualMemorySize, getTotalPhysicalMemory, getTotalSwapSpaceSize, isHardwareEmulated, isProcessRunning, retrieveMemoryUsage, retrieveMemoryUsage, retrieveProcessorUsage, retrieveProcessorUsage, retrieveTotalProcessorUsage, retrieveTotalProcessorUsage
-
Methods declared in interface com.sun.management.OperatingSystemMXBean
getFreePhysicalMemorySize, getSystemCpuLoad, getTotalPhysicalMemorySize
-
Methods declared in interface java.lang.management.OperatingSystemMXBean
getArch, getAvailableProcessors, getName, getSystemLoadAverage, getVersion
-
Methods declared in interface java.lang.management.PlatformManagedObject
getObjectName
-
-
-
-
Method Detail
-
getInstance
public static ExtendedOperatingSystemMXBeanImpl getInstance()
Singleton accessor method.- Returns:
- the
ExtendedOperatingSystemMXBeanImpl
singleton.
-
getHardwareModel
public final String getHardwareModel() throws UnsupportedOperationException
Retrieve hardware model- Specified by:
getHardwareModel
in interfaceOperatingSystemMXBean
- Returns:
- String containing the hardware model. NULL in case of an error.
- Throws:
UnsupportedOperationException
- if the operation is not implemented on this platform. UnsupportedOperationException will also be thrown if the operation is implemented but it cannot be performed because the system does not satisfy all the requirements, for example, an OS service is not installed.
-
getNotificationInfo
public final MBeanNotificationInfo[] getNotificationInfo()
Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.
It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.
- Specified by:
getNotificationInfo
in interfaceNotificationBroadcaster
- Returns:
- the array of possible notifications.
-
addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
Adds a listener to this MBean.- Specified by:
addNotificationListener
in interfaceNotificationBroadcaster
- Parameters:
listener
- The listener object which will handle the notifications emitted by the broadcaster.filter
- The filter object. If filter is null, no filtering will be performed before handling notifications.handback
- An opaque object to be sent back to the listener when a notification is emitted. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.- Throws:
IllegalArgumentException
- Listener parameter is null.- See Also:
NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)
-
removeNotificationListener
public final void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.- Specified by:
removeNotificationListener
in interfaceNotificationBroadcaster
- Parameters:
listener
- A listener that was previously added to this MBean.- Throws:
ListenerNotFoundException
- The listener is not registered with the MBean.- See Also:
NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
,NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
-
removeNotificationListener
public final void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
Removes a listener from this MBean. The MBean must have a listener that exactly matches the given
listener
,filter
, andhandback
parameters. If there is more than one such listener, only one is removed.The
filter
andhandback
parameters may be null if and only if they are null in a listener to be removed.- Specified by:
removeNotificationListener
in interfaceNotificationEmitter
- Parameters:
listener
- A listener that was previously added to this MBean.filter
- The filter that was specified when the listener was added.handback
- The handback that was specified when the listener was added.- Throws:
ListenerNotFoundException
- The listener is not registered with the MBean, or it is not registered with the given filter and handback.
-
sendNotification
public final void sendNotification(Notification notification)
Send notifications to registered listeners.- Parameters:
notification
- a notification to be sent
-
-