diff options
Diffstat (limited to 'js/src')
-rw-r--r-- | js/src/Ice/ObjectPrx.js | 26 | ||||
-rw-r--r-- | js/src/Ice/Reference.js | 49 |
2 files changed, 74 insertions, 1 deletions
diff --git a/js/src/Ice/ObjectPrx.js b/js/src/Ice/ObjectPrx.js index ae4d66ed156..9478274e608 100644 --- a/js/src/Ice/ObjectPrx.js +++ b/js/src/Ice/ObjectPrx.js @@ -428,6 +428,32 @@ class ObjectPrx } } + ice_getTimeout() + { + return this._reference.getTimeout(); + } + + ice_fixed(connection) + { + if(connection === null) + { + throw new Error("invalid null connection passed to ice_fixed"); + } + if(!(connection instanceof Ice.ConnectionI)) + { + throw new Error("invalid connection passed to ice_fixed"); + } + const ref = this._reference.changeConnection(connection); + if(ref.equals(this._reference)) + { + return this; + } + else + { + return this._newInstance(ref); + } + } + ice_getConnectionId() { return this._reference.getConnectionId(); diff --git a/js/src/Ice/Reference.js b/js/src/Ice/Reference.js index 01e981d6421..84a302cc676 100644 --- a/js/src/Ice/Reference.js +++ b/js/src/Ice/Reference.js @@ -986,6 +986,13 @@ class Reference return ""; } + getTimeout() + { + // Abstract + Debug.assert(false); + return ""; + } + // // The change* methods (here and in derived classes) create // a new reference based on the existing one, with the @@ -1145,6 +1152,13 @@ class Reference return null; } + changeConnection(connection) + { + // Abstract + Debug.assert(false); + return null; + } + hashCode() { if(this._hashInitialized) @@ -1491,6 +1505,11 @@ class FixedReference extends Reference return ""; } + getTimeout() + { + return undefined; + } + changeAdapterId(newAdapterId) { throw new Ice.FixedProxyException(); @@ -1541,6 +1560,17 @@ class FixedReference extends Reference throw new Ice.FixedProxyException(); } + changeConnection(newConnection) + { + if(newConnection == this._fixedConnection) + { + return this; + } + const r = this.getInstance().referenceFactory().copy(this); + r._fixedConnection = newConnection; + return r; + } + isIndirect() { return false; @@ -1630,7 +1660,7 @@ class FixedReference extends Reference { return false; } - return this._fixedConnection.equals(rhs._fixedConnection); + return this._fixedConnection == rhs._fixedConnection; } } @@ -1711,6 +1741,11 @@ class RoutableReference extends Reference return this._connectionId; } + getTimeout() + { + return this._overrideTimeout ? this._timeout : undefined; + } + changeEncoding(newEncoding) { const r = super.changeEncoding(newEncoding); @@ -1843,6 +1878,18 @@ class RoutableReference extends Reference return r; } + changeConnection(newConnection) + { + return new FixedReference(this.getInstance(), + this.getCommunicator(), + this.getIdentity(), + this.getFacet(), + this.getMode(), + this.getSecure(), + this.getEncoding(), + newConnection); + } + isIndirect() { return this._endpoints.length === 0; |