summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/dnbd3/status/rpc/Status.java
blob: 07fc782a0c76c67abe5058c462b600c1a72dd042 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package org.openslx.dnbd3.status.rpc;

import java.util.List;

public class Status
{

	private long bytesReceived = -1;
	private long bytesSent = -1;
	private int uptime = -1;
	private List<Image> images = null;
	private List<Client> clients = null;
	private String address = null;
	private long timeStamp = -1;

	public long getBytesReceived()
	{
		return bytesReceived;
	}

	public long getBytesSent()
	{
		return bytesSent;
	}

	public int getUptime()
	{
		return uptime;
	}

	public List<Image> getImages()
	{
		return images;
	}

	public List<Client> getClients()
	{
		return clients;
	}

	public String getAddress()
	{
		return address;
	}

	public void setAddress( String address )
	{
		this.address = address;
	}

	@Override
	public String toString()
	{
		String ret = "(in: " + bytesReceived + ", out: " + bytesSent;
		if ( clients != null )
			ret += ", clients: (" + clients.toString() + ")";
		if ( images != null )
			ret += ", images: (" + images.toString() + ")";
		ret += ")";
		return ret;
	}

	public void setTimestamp( long currentTimeMillis )
	{
		this.timeStamp = currentTimeMillis;
	}

	public long getTimestamp()
	{
		return this.timeStamp;
	}

}