Class UnixExtendedOperatingSystem
java.lang.Object
com.ibm.lang.management.internal.ExtendedOperatingSystemMXBeanImpl
com.ibm.lang.management.internal.UnixExtendedOperatingSystem
- All Implemented Interfaces:
 OperatingSystemMXBean, UnixOperatingSystemMXBean, OperatingSystemMXBean, UnixOperatingSystemMXBean, OperatingSystemMXBean, PlatformManagedObject, NotificationBroadcaster, NotificationEmitter
public final class UnixExtendedOperatingSystem
extends ExtendedOperatingSystemMXBeanImpl
implements UnixOperatingSystemMXBean
- 
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) Adds a listener to this MBean.final StringgetArch()Returns a unique string identifier for the architecture of the underlying operating system.final intReturns the number of processors that are available for the virtual machine to run on.static UnixExtendedOperatingSystemlongReturns the maximum number of file descriptors that can be opened in a process.final StringgetName()Returns the name of the underlying operating system.final ObjectNameReturns anObjectNameinstance representing the object name of this platform managed object.longReturns the current number of file descriptors that are in opened state.final doubleReturns a double value which holds the system load average calculated for the minute preceding the call, where system load average is taken to mean the following:final StringReturns the version string for the underlying operating system.final voidRemoves a listener from this MBean.final voidremoveNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) Removes a listener from this MBean.final voidsendNotification(Notification notification) Send notifications to registered listeners.Methods declared in class ExtendedOperatingSystemMXBeanImpl
getCommittedVirtualMemorySize, getCpuLoad, getFreeMemorySize, getFreeSwapSpaceSize, getHardwareModel, getNotificationInfo, getProcessCpuLoad, getProcessCpuTime, getProcessingCapacity, getProcessPhysicalMemorySize, getProcessPrivateMemorySize, getTotalMemorySize, getTotalSwapSpaceSize, isHardwareEmulated, isProcessRunning, retrieveMemoryUsage, retrieveMemoryUsage, retrieveProcessorUsage, retrieveProcessorUsage, retrieveTotalProcessorUsage, retrieveTotalProcessorUsageMethods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface OperatingSystemMXBean
getCommittedVirtualMemorySize, getFreeSwapSpaceSize, getHardwareModel, getProcessCpuLoad, getProcessCpuTime, getProcessingCapacity, getProcessPhysicalMemorySize, getProcessPrivateMemorySize, getTotalSwapSpaceSize, isHardwareEmulated, isProcessRunning, retrieveMemoryUsage, retrieveMemoryUsage, retrieveProcessorUsage, retrieveProcessorUsage, retrieveTotalProcessorUsage, retrieveTotalProcessorUsageMethods declared in interface OperatingSystemMXBean
getCpuLoad, getFreeMemorySize, getFreePhysicalMemorySize, getSystemCpuLoad, getTotalMemorySize, getTotalPhysicalMemorySizeMethods declared in interface OperatingSystemMXBean
getArch, getAvailableProcessors, getName, getSystemLoadAverage, getVersionMethods declared in interface PlatformManagedObject
getObjectName 
- 
Method Details
- 
getInstance
 - 
getMaxFileDescriptorCount
public long getMaxFileDescriptorCount()Returns the maximum number of file descriptors that can be opened in a process.- Specified by:
 getMaxFileDescriptorCountin interfaceUnixOperatingSystemMXBean- Specified by:
 getMaxFileDescriptorCountin interfaceUnixOperatingSystemMXBean- Returns:
 - The maximum number of file descriptors that can be opened in a process or -1, if an error occurred while obtaining this. If the operating system doesn't have any limits configured, Long.MAX_VALUE is returned.
 
 - 
getOpenFileDescriptorCount
public long getOpenFileDescriptorCount()Returns the current number of file descriptors that are in opened state.- Specified by:
 getOpenFileDescriptorCountin interfaceUnixOperatingSystemMXBean- Specified by:
 getOpenFileDescriptorCountin interfaceUnixOperatingSystemMXBean- Returns:
 - The current number of file descriptors that are in opened state or -1, if an error occurred while obtaining this.
 
 - 
getArch
Returns a unique string identifier for the architecture of the underlying operating system. The identifier value is identical to that which would be obtained from a call toSystem.getProperty(java.lang.String)supplying the value "os.arch" for the key.- Specified by:
 getArchin interfaceOperatingSystemMXBean- Returns:
 - the identifier for the operating system architecture.
 - See Also:
 
 - 
getAvailableProcessors
public final int getAvailableProcessors()Returns the number of processors that are available for the virtual machine to run on. The information returned from this method is identical to that which would be received from a call toRuntime.availableProcessors().- Specified by:
 getAvailableProcessorsin interfaceOperatingSystemMXBean- Returns:
 - the number of available processors.
 
 - 
getName
Returns the name of the underlying operating system. The value is identical to that which would be obtained from a call toSystem.getProperty(java.lang.String)supplying the value "os.name" for the key.- Specified by:
 getNamein interfaceOperatingSystemMXBean- Returns:
 - the name of the operating system.
 - See Also:
 
 - 
getObjectName
Returns anObjectNameinstance representing the object name of this platform managed object.- Specified by:
 getObjectNamein interfacePlatformManagedObject- Returns:
 - an 
ObjectNameinstance representing the object name of this platform managed object. 
 - 
getSystemLoadAverage
public final double getSystemLoadAverage()Returns a double value which holds the system load average calculated for the minute preceding the call, where system load average is taken to mean the following:the time-averaged value of the sum of the number of runnable entities running on the available processors and the number of runnable entities ready and queued to run on the available processors. The averaging technique adopted can vary depending on the underlying operating system.
- Specified by:
 getSystemLoadAveragein interfaceOperatingSystemMXBean- Returns:
 - normally, the system load average as a double. If the system load average is not obtainable (e.g. because the calculation may involve an unacceptable performance impact) then a negative value is returned.
 
 - 
getVersion
Returns the version string for the underlying operating system. The value is identical to that which would be obtained from a call toSystem.getProperty(java.lang.String)supplying the value "os.version" for the key.- Specified by:
 getVersionin interfaceOperatingSystemMXBean- Returns:
 - the version of the operating system.
 - See Also:
 
 - 
addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException Adds a listener to this MBean.- Specified by:
 addNotificationListenerin 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:
 
 - 
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:
 removeNotificationListenerin interfaceNotificationBroadcaster- Parameters:
 listener- A listener that was previously added to this MBean.- Throws:
 ListenerNotFoundException- The listener is not registered with the MBean.- See Also:
 
 - 
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, andhandbackparameters. If there is more than one such listener, only one is removed.The
filterandhandbackparameters may be null if and only if they are null in a listener to be removed.- Specified by:
 removeNotificationListenerin 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
Send notifications to registered listeners.- Parameters:
 notification- a notification to be sent
 
 -