mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1132: Add identifier to connection records.
This commit is contained in:
@@ -52,6 +52,11 @@ public class ModeledConnectionRecord implements ConnectionRecord {
|
|||||||
this.model = model;
|
this.model = model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getIdentifier() {
|
||||||
|
return model.getConnectionIdentifier();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Date getStartDate() {
|
public Date getStartDate() {
|
||||||
return model.getStartDate();
|
return model.getStartDate();
|
||||||
|
@@ -150,6 +150,11 @@ public class ActiveConnectionRecord implements ConnectionRecord {
|
|||||||
return balancingGroup != null;
|
return balancingGroup != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getIdentifier() {
|
||||||
|
return connection.getIdentifier();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Date getStartDate() {
|
public Date getStartDate() {
|
||||||
return startDate;
|
return startDate;
|
||||||
|
@@ -33,6 +33,16 @@ import org.glyptodon.guacamole.net.GuacamoleSocket;
|
|||||||
*/
|
*/
|
||||||
public interface ConnectionRecord {
|
public interface ConnectionRecord {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the identifier of the connection associated with this connection
|
||||||
|
* record.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The identifier of the connection associated with this connection
|
||||||
|
* record.
|
||||||
|
*/
|
||||||
|
public String getIdentifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the date and time the connection began.
|
* Returns the date and time the connection began.
|
||||||
*
|
*
|
||||||
|
@@ -32,6 +32,11 @@ import org.glyptodon.guacamole.net.auth.ConnectionRecord;
|
|||||||
*/
|
*/
|
||||||
public class APITunnel {
|
public class APITunnel {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier of the connection associated with this tunnel.
|
||||||
|
*/
|
||||||
|
private final String identifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The date and time the connection began.
|
* The date and time the connection began.
|
||||||
*/
|
*/
|
||||||
@@ -60,12 +65,23 @@ public class APITunnel {
|
|||||||
* The record to copy data from.
|
* The record to copy data from.
|
||||||
*/
|
*/
|
||||||
public APITunnel(ConnectionRecord record) {
|
public APITunnel(ConnectionRecord record) {
|
||||||
|
this.identifier = record.getIdentifier();
|
||||||
this.startDate = record.getStartDate();
|
this.startDate = record.getStartDate();
|
||||||
this.remoteHost = record.getRemoteHost();
|
this.remoteHost = record.getRemoteHost();
|
||||||
this.username = record.getUsername();
|
this.username = record.getUsername();
|
||||||
this.uuid = "STUB"; // STUB
|
this.uuid = "STUB"; // STUB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the identifier of the connection associated with this tunnel.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* The identifier of the connection associated with this tunnel.
|
||||||
|
*/
|
||||||
|
public String getIdentifier() {
|
||||||
|
return identifier;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the date and time the connection began.
|
* Returns the date and time the connection began.
|
||||||
*
|
*
|
||||||
|
@@ -40,6 +40,13 @@ angular.module('rest').factory('ActiveTunnel', [function defineActiveTunnel() {
|
|||||||
// Use empty object by default
|
// Use empty object by default
|
||||||
template = template || {};
|
template = template || {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier of the connection associated with this tunnel.
|
||||||
|
*
|
||||||
|
* @type String
|
||||||
|
*/
|
||||||
|
this.identifier = template.identifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The time that the tunnel began, in seconds since
|
* The time that the tunnel began, in seconds since
|
||||||
* 1970-01-01 00:00:00 UTC.
|
* 1970-01-01 00:00:00 UTC.
|
||||||
|
Reference in New Issue
Block a user