From 45ada5475192f6afc9645c401de46765be87ee3f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 21 May 2015 16:39:25 +0200 Subject: Lean and mean first prototype - to be improved! --- .../java/org/openslx/dnbd3/status/rpc/Status.java | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 src/main/java/org/openslx/dnbd3/status/rpc/Status.java (limited to 'src/main/java/org/openslx/dnbd3/status/rpc/Status.java') 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 images = null; + private List 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 getImages() + { + return images; + } + + public List 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; + } + +} -- cgit v1.2.3-55-g7522