1 5 package org.exoplatform.container.monitor.jvm.v14; 6 7 8 import java.net.URL ; 9 import org.exoplatform.container.monitor.jvm.OperatingSystemInfo; 10 15 public class OperatingSystemInfoImpl implements OperatingSystemInfo { 16 17 public OperatingSystemInfoImpl() { 18 } 19 20 public String getArch() { return "N/A" ; } 21 22 public String getName() { return "N/A" ; } 23 24 public String getVersion() { return "N/A" ;} 25 26 public int getAvailableProcessors() { return -1 ; } 27 28 public URL createURL(String file) throws Exception { 29 return new URL ("file:" + file) ; 30 } 31 32 public String toString() { 33 StringBuffer b = new StringBuffer () ; 34 b.append("Operating System: ").append(getName()).append("\n") ; 35 b.append("Operating System Version : ").append(getVersion()).append("\n") ; 36 b.append("CPU Achitechure : ").append(getArch()).append("\n") ; 37 b.append("Number of Processors : ").append(getAvailableProcessors()).append("\n") ; 38 return b.toString() ; 39 } 40 } | Popular Tags |