/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about processes. * * @see SystemInfo#getProcesses(String) */ public List<ProcessInfo> getProcesses(String processInfoQuery) { throw getUnsupportedException("Cannot get the process table information without native support"); }
/** * This method is reserved for those objects (like shutdown hooks) that are aware of the VM going down - at which * time it would be appropriate to give the native libraries a chance to clean up after themselves. */ public static synchronized void shutdown() { // Unclear if this should be 'shutdownNow()' or not // This is used to execute sub processes; so it seems polite to wait for completion executor.shutdown(); // This is needed by tests executor = Executors.newCachedThreadPool(threadFactory); javaSystemInfo = new JavaSystemInfo(executor); if (initialized) { // initialized is only ever set to true if the native layer was actually initialized // we don't want or need to check enabled/disabled here; we could have disabled after // the native library was initialized // Does not look like there are any static SIGAR methods that need to be called at shutdown; // Sigar.finalize() takes care of instance cleanup // try // { // Sigar.XXXshutdownXXX(); // } // catch ( Throwable t ) // { // } initialized = false; cachedSystemInfo = null; } }
/** * This method is reserved for those objects (like shutdown hooks) that are aware of the VM going down - at which * time it would be appropriate to give the native libraries a chance to clean up after themselves. */ public static synchronized void shutdown() { // Unclear if this should be 'shutdownNow()' or not // This is used to execute sub processes; so it seems polite to wait for completion executor.shutdown(); // This is needed by tests executor = Executors.newCachedThreadPool(threadFactory); javaSystemInfo = new JavaSystemInfo(executor); if (initialized) { // initialized is only ever set to true if the native layer was actually initialized // we don't want or need to check enabled/disabled here; we could have disabled after // the native library was initialized // Does not look like there are any static SIGAR methods that need to be called at shutdown; // Sigar.finalize() takes care of instance cleanup // try // { // Sigar.XXXshutdownXXX(); // } // catch ( Throwable t ) // { // } initialized = false; cachedSystemInfo = null; } }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about file systems. * * @see SystemInfo#getFileSystems() */ public List<FileSystemInfo> getFileSystems() { throw getUnsupportedException("Cannot get file systems information"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about currently running * processes. * * @see SystemInfo#getAllProcesses() */ public List<ProcessInfo> getAllProcesses() throws UnsupportedOperationException { throw getUnsupportedException("Cannot get the process table information without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about low level memory * details. * * @see SystemInfo#getMemoryInfo() */ public Mem getMemoryInfo() { throw getUnsupportedException("Cannot get any information about memory without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about CPUs. * * @see SystemInfo#getCpu(int) */ public CpuInformation getCpu(int cpuIndex) { throw getUnsupportedException("Cannot get CPU information without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about file systems. * * @see SystemInfo#getFileSystems() */ public List<FileSystemInfo> getFileSystems() { throw getUnsupportedException("Cannot get file systems information"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about currently running * processes. * * @see SystemInfo#getThisProcess() */ public ProcessInfo getThisProcess() { throw getUnsupportedException("Cannot get information on this process without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about low level memory * details. * * @see SystemInfo#getMemoryInfo() */ public Mem getMemoryInfo() { throw getUnsupportedException("Cannot get any information about memory without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about CPUs. * * @see SystemInfo#getCpu(int) */ public CpuInformation getCpu(int cpuIndex) { throw getUnsupportedException("Cannot get CPU information without native support"); }
/** * Returns partially filled {@link NetworkAdapterInfo} objects - only the data available via the Java API * (particularly the <code>NetworkInterface</code> class) will be available in the returned objects. * * @see SystemInfo#getAllServices() */ public List<NetworkAdapterInfo> getAllNetworkAdapters() throws SystemInfoException { throw getUnsupportedException("Cannot get list of network adaptors without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about currently running * processes. * * @see SystemInfo#getThisProcess() */ public ProcessInfo getThisProcess() { throw getUnsupportedException("Cannot get information on this process without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about installed * services. * * @see SystemInfo#getAllServices() */ public List<ServiceInfo> getAllServices() throws UnsupportedOperationException { throw getUnsupportedException("Cannot get list of installed services without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about the number of * CPUs. * * @see SystemInfo#getNumberOfCpus() */ public int getNumberOfCpus() { throw getUnsupportedException("Cannot get the number of CPUs without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about installed * services. * * @see SystemInfo#getAllServices() */ public List<ServiceInfo> getAllServices() throws UnsupportedOperationException { throw getUnsupportedException("Cannot get list of installed services without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about the number of * CPUs. * * @see SystemInfo#getNumberOfCpus() */ public int getNumberOfCpus() { throw getUnsupportedException("Cannot get the number of CPUs without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about low level swap * details. * * @see SystemInfo#getSwapInfo() */ public Swap getSwapInfo() { throw getUnsupportedException("Cannot get any information about swap without native support"); }
/** * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about file systems. * * @see SystemInfo#getFileSystem(String) */ public FileSystemInfo getFileSystem(String directory) { throw getUnsupportedException("Cannot get file system information"); }
/** * Returns partially filled {@link NetworkAdapterInfo} objects - only the data available via the Java API * (particularly the <code>NetworkInterface</code> class) will be available in the returned objects. * * @see SystemInfo#getAllServices() */ public List<NetworkAdapterInfo> getAllNetworkAdapters() throws SystemInfoException { throw getUnsupportedException("Cannot get list of network adaptors without native support"); }