diff options
author | Udo Walter | 2020-05-07 19:30:48 +0200 |
---|---|---|
committer | Udo Walter | 2020-05-07 19:30:48 +0200 |
commit | 90f06cbe0b2ff3b1a9d85d2f73fe5864e692341b (patch) | |
tree | 17139070c9ac144f9cd214a01e4af5e86a895dbe /src/main/java/de/bwlehrpool/bwlp_guac/AvailableClient.java | |
parent | Prevent user from sticking to connection if it was reset. (diff) | |
download | bwlp-guacamole-ext-90f06cbe0b2ff3b1a9d85d2f73fe5864e692341b.tar.gz bwlp-guacamole-ext-90f06cbe0b2ff3b1a9d85d2f73fe5864e692341b.tar.xz bwlp-guacamole-ext-90f06cbe0b2ff3b1a9d85d2f73fe5864e692341b.zip |
Add location selection
Diffstat (limited to 'src/main/java/de/bwlehrpool/bwlp_guac/AvailableClient.java')
-rw-r--r-- | src/main/java/de/bwlehrpool/bwlp_guac/AvailableClient.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/de/bwlehrpool/bwlp_guac/AvailableClient.java b/src/main/java/de/bwlehrpool/bwlp_guac/AvailableClient.java index c886397..e9144f8 100644 --- a/src/main/java/de/bwlehrpool/bwlp_guac/AvailableClient.java +++ b/src/main/java/de/bwlehrpool/bwlp_guac/AvailableClient.java @@ -1,6 +1,7 @@ package de.bwlehrpool.bwlp_guac; import java.io.IOException; +import java.util.ArrayList; import java.util.concurrent.atomic.AtomicLong; import org.apache.guacamole.protocol.GuacamoleConfiguration; @@ -15,10 +16,14 @@ public class AvailableClient implements Cloneable { private static final AtomicLong CON_ID = new AtomicLong(); + public ArrayList<JsonLocation> locationList = new ArrayList<JsonLocation>(); + private final String clientip; private String password; + private int locationid; + private State state; private String inUseBy; @@ -35,6 +40,7 @@ public class AvailableClient implements Cloneable { public AvailableClient(JsonClient source) { this.clientip = source.clientip; + this.locationid = source.locationid; update(source); } @@ -110,6 +116,14 @@ public class AvailableClient implements Cloneable { return clientip + "/" + state + "/" + inUseBy; } + public State getState() { + return state; + } + + public int getLocationid() { + return locationid; + } + public GuacamoleConfiguration toGuacConfig() { GuacamoleConfiguration cfg = new GuacamoleConfiguration(); cfg.setProtocol("vnc"); |