From bc97fc8246155e02bc99ce8fd64907942316fd8f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 11 Feb 2017 14:02:58 -0800 Subject: [PATCH] GUACAMOLE-208: Define and document new status codes. --- .../src/main/webapp/modules/Status.js | 39 +++++++++++++++++++ .../guacamole/protocol/GuacamoleStatus.java | 29 ++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/guacamole-common-js/src/main/webapp/modules/Status.js b/guacamole-common-js/src/main/webapp/modules/Status.js index 457dc3c6a..ceadaa68c 100644 --- a/guacamole-common-js/src/main/webapp/modules/Status.js +++ b/guacamole-common-js/src/main/webapp/modules/Status.js @@ -140,6 +140,45 @@ Guacamole.Status.Code = { */ "RESOURCE_CLOSED": 0x0206, + /** + * The operation could not be performed because the upstream server does + * not appear to exist. + * + * @type {Number} + */ + "UPSTREAM_NOT_FOUND": 0x0207, + + /** + * The operation could not be performed because the upstream server is not + * available to service the request. + * + * @type {Number} + */ + "UPSTREAM_UNAVAILABLE": 0x0208, + + /** + * The session within the upstream server has ended because it conflicted + * with another session. + * + * @type {Number} + */ + "SESSION_CONFLICT": 0x0209, + + /** + * The session within the upstream server has ended because it appeared to + * be inactive. + * + * @type {Number} + */ + "SESSION_TIMEOUT": 0x020A, + + /** + * The session within the upstream server has been forcibly terminated. + * + * @type {Number} + */ + "SESSION_CLOSED": 0x020B, + /** * The operation could not be performed because bad parameters were given. * diff --git a/guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleStatus.java b/guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleStatus.java index a5e84c689..56ab2ef38 100644 --- a/guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleStatus.java +++ b/guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleStatus.java @@ -71,6 +71,35 @@ public enum GuacamoleStatus { */ RESOURCE_CONFLICT(409, 1008, 0x0205), + /** + * The operation could not be performed because the upstream server does + * not appear to exist. + */ + UPSTREAM_NOT_FOUND(502, 1011, 0x0207), + + /** + * The operation could not be performed because the upstream server is not + * available to service the request. + */ + UPSTREAM_UNAVAILABLE(502, 1011, 0x0208), + + /** + * The session within the upstream server has ended because it conflicted + * with another session. + */ + SESSION_CONFLICT(409, 1008, 0x0209), + + /** + * The session within the upstream server has ended because it appeared to + * be inactive. + */ + SESSION_TIMEOUT(408, 1002, 0x020A), + + /** + * The session within the upstream server has been forcibly terminated. + */ + SESSION_CLOSED(404, 1002, 0x020B), + /** * The operation could not be performed because bad parameters were given. */