Subversion Repositories XServices

Rev

Rev 87 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 87 Rev 116
Line 16... Line 16...
16
 
16
 
Line 17... Line 17...
17
package net.brutex.xservices.types;
17
package net.brutex.xservices.types;
Line 18... Line 18...
18
 
18
 
19
import javax.xml.bind.annotation.XmlElement;
19
import javax.xml.bind.annotation.XmlElement;
-
 
20
 
20
 
21
/**
21
/*
-
 
22
 * Information about processors and memory
-
 
23
 */
-
 
24
public class RuntimeInfoType {
-
 
25
	
-
 
26
	private final Runtime runtime = Runtime.getRuntime();
-
 
27
	
-
 
28
	@XmlElement
-
 
29
	public int getAvailableProcessors() {
-
 
30
		return runtime.availableProcessors();
-
 
31
	}
-
 
32
	
-
 
33
	@XmlElement
-
 
34
	public long getFreeMemory() {
-
 
35
		return runtime.freeMemory();
-
 
36
	}
-
 
37
	
-
 
38
	@XmlElement
-
 
39
	public long getFreeMemoryMB() {
-
 
40
		return runtime.freeMemory() / 1024;
-
 
41
	}
-
 
42
	
-
 
43
	@XmlElement
-
 
44
	public long getMaxMemory() {
-
 
45
		return runtime.maxMemory();
-
 
46
	}
-
 
47
	
-
 
48
	@XmlElement
-
 
49
	public long getMaxMemoryMB() {
-
 
50
		return runtime.maxMemory() / 1024;
-
 
51
	}
-
 
52
	
-
 
53
	@XmlElement
-
 
54
	public long getTotalMemory() {
-
 
55
		return runtime.totalMemory();
-
 
56
	}
-
 
57
	
-
 
58
	@XmlElement
-
 
Line -... Line 22...
-
 
22
 * @author Brian Rosenberger, bru(at)brutex.de
-
 
23
 *
-
 
24
 */
-
 
25
 
-
 
26
public class RuntimeInfoType
-
 
27
{
-
 
28
  private final Runtime runtime = Runtime.getRuntime();
-
 
29
 
-
 
30
  @XmlElement
-
 
31
  public int getAvailableProcessors() {
-
 
32
    return this.runtime.availableProcessors();
-
 
33
  }
-
 
34
 
-
 
35
  @XmlElement
-
 
36
  public long getFreeMemory() {
-
 
37
    return this.runtime.freeMemory();
-
 
38
  }
-
 
39
 
-
 
40
  @XmlElement
-
 
41
  public long getFreeMemoryMB() {
-
 
42
    return this.runtime.freeMemory() / 1024L;
-
 
43
  }
-
 
44
 
-
 
45
  @XmlElement
-
 
46
  public long getMaxMemory() {
-
 
47
    return this.runtime.maxMemory();
-
 
48
  }
-
 
49
 
-
 
50
  @XmlElement
-
 
51
  public long getMaxMemoryMB() {
-
 
52
    return this.runtime.maxMemory() / 1024L;
-
 
53
  }
-
 
54
 
-
 
55
  @XmlElement
-
 
56
  public long getTotalMemory() {
-
 
57
    return this.runtime.totalMemory();
-
 
58
  }
-
 
59
 
59
	public long getTotalMemoryMB() {
60
  @XmlElement