summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/dnbd3/status/rpc/Status.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/dnbd3/status/rpc/Status.java')
-rw-r--r--src/main/java/org/openslx/dnbd3/status/rpc/Status.java73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/dnbd3/status/rpc/Status.java b/src/main/java/org/openslx/dnbd3/status/rpc/Status.java
new file mode 100644
index 0000000..07fc782
--- /dev/null
+++ b/src/main/java/org/openslx/dnbd3/status/rpc/Status.java
@@ -0,0 +1,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;
+ }
+
+}