org.outerj.daisy.repository.serverimpl
Class SystemInfoImpl

java.lang.Object
  extended by org.outerj.daisy.repository.serverimpl.SystemInfoImpl
All Implemented Interfaces:
org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.service.Serviceable, SystemInfoImplMBean

public class SystemInfoImpl
extends java.lang.Object
implements SystemInfoImplMBean, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.activity.Initializable


Constructor Summary
SystemInfoImpl()
           
 
Method Summary
 int getAvailableProcessors()
          Shows the number of available processors for the VM
 java.lang.String getFileEncoding()
          Shows file encoding.
 long getFreeVmMemory()
          Shows the current amount of free memory in the VM, measured in bytes.
 long getMaxVmMemory()
          Shows the maximum amount of memory that the VM will attempt to use, measured in bytes.
 java.lang.String getServerVersion()
           
 java.util.Date getStartTime()
          Shows the (approx.) time when the system was started.
 long getTotalVmMemory()
          Shows the total amount of free memory in the VM, measured in bytes.
 java.lang.String getUpTime()
          Shows the (approx.) current system uptime
 java.lang.String getVmMemoryFormatted()
           
 void initialize()
           
 void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
           
 void triggerGarbageCollector()
          Suggests the VM to run the Garbage Collector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemInfoImpl

public SystemInfoImpl()
Method Detail

service

public void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Throws:
org.apache.avalon.framework.service.ServiceException

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception

getFreeVmMemory

public long getFreeVmMemory()
Description copied from interface: SystemInfoImplMBean
Shows the current amount of free memory in the VM, measured in bytes.

Specified by:
getFreeVmMemory in interface SystemInfoImplMBean

getUpTime

public java.lang.String getUpTime()
Description copied from interface: SystemInfoImplMBean
Shows the (approx.) current system uptime

Specified by:
getUpTime in interface SystemInfoImplMBean

triggerGarbageCollector

public void triggerGarbageCollector()
Description copied from interface: SystemInfoImplMBean
Suggests the VM to run the Garbage Collector

Specified by:
triggerGarbageCollector in interface SystemInfoImplMBean

getStartTime

public java.util.Date getStartTime()
Description copied from interface: SystemInfoImplMBean
Shows the (approx.) time when the system was started.

Specified by:
getStartTime in interface SystemInfoImplMBean

getMaxVmMemory

public long getMaxVmMemory()
Description copied from interface: SystemInfoImplMBean
Shows the maximum amount of memory that the VM will attempt to use, measured in bytes.

Specified by:
getMaxVmMemory in interface SystemInfoImplMBean

getTotalVmMemory

public long getTotalVmMemory()
Description copied from interface: SystemInfoImplMBean
Shows the total amount of free memory in the VM, measured in bytes.

Specified by:
getTotalVmMemory in interface SystemInfoImplMBean

getAvailableProcessors

public int getAvailableProcessors()
Description copied from interface: SystemInfoImplMBean
Shows the number of available processors for the VM

Specified by:
getAvailableProcessors in interface SystemInfoImplMBean

getVmMemoryFormatted

public java.lang.String getVmMemoryFormatted()
Specified by:
getVmMemoryFormatted in interface SystemInfoImplMBean

getFileEncoding

public java.lang.String getFileEncoding()
Description copied from interface: SystemInfoImplMBean
Shows file encoding.

Specified by:
getFileEncoding in interface SystemInfoImplMBean

getServerVersion

public java.lang.String getServerVersion()
Specified by:
getServerVersion in interface SystemInfoImplMBean


Copyright © -2012 . All Rights Reserved.