diff options
author | Jose <jose@zeroc.com> | 2019-06-21 21:10:51 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-06-21 21:11:22 +0200 |
commit | 004138a45e1dc99c7a3ed61d6ee000b6638ae325 (patch) | |
tree | bfb9d6c9ae5f79b4fcf9ea7726bed0290497c473 /js | |
parent | Fixed incorrect comment for ice_flushBatchRequestsAsync. Fixes #379. (diff) | |
download | ice-004138a45e1dc99c7a3ed61d6ee000b6638ae325.tar.bz2 ice-004138a45e1dc99c7a3ed61d6ee000b6638ae325.tar.xz ice-004138a45e1dc99c7a3ed61d6ee000b6638ae325.zip |
Add ice_isFixed - Close #356
Diffstat (limited to 'js')
-rw-r--r-- | js/src/Ice/ObjectPrx.d.ts | 7 | ||||
-rw-r--r-- | js/src/Ice/ObjectPrx.js | 5 | ||||
-rw-r--r-- | js/test/Ice/proxy/Client.js | 2 | ||||
-rw-r--r-- | js/test/typescript/Ice/proxy/Client.ts | 2 |
4 files changed, 16 insertions, 0 deletions
diff --git a/js/src/Ice/ObjectPrx.d.ts b/js/src/Ice/ObjectPrx.d.ts index 5c5effe4999..6ea90a7022b 100644 --- a/js/src/Ice/ObjectPrx.d.ts +++ b/js/src/Ice/ObjectPrx.d.ts @@ -352,6 +352,13 @@ declare module "ice" ice_fixed(conn:Connection):this; /** + * Returns whether this proxy is a fixed proxy. + * + * @return True if this is a fixed proxy, false otherwise. + **/ + ice_isFixed():boolean; + + /** * Obtains the Connection for this proxy. If the proxy does not yet have an established connection, * it first attempts to create a connection. * @return The asynchronous result object for the invocation. diff --git a/js/src/Ice/ObjectPrx.js b/js/src/Ice/ObjectPrx.js index e51fe929a00..a29698fe192 100644 --- a/js/src/Ice/ObjectPrx.js +++ b/js/src/Ice/ObjectPrx.js @@ -447,6 +447,11 @@ class ObjectPrx } } + ice_isFixed() + { + return this._reference instanceof Ice.FixedReference; + } + ice_getConnectionId() { return this._reference.getConnectionId(); diff --git a/js/test/Ice/proxy/Client.js b/js/test/Ice/proxy/Client.js index 0ad59852ad5..e96681dc8e5 100644 --- a/js/test/Ice/proxy/Client.js +++ b/js/test/Ice/proxy/Client.js @@ -740,6 +740,8 @@ const connection = await cl.ice_getConnection(); if(connection !== null) { + test(!cl.ice_isFixed()); + test(cl.ice_fixed(connection).ice_isFixed()); await cl.ice_fixed(connection).getContext(); test(cl.ice_secure(true).ice_fixed(connection).ice_isSecure()); test(cl.ice_facet("facet").ice_fixed(connection).ice_getFacet() == "facet"); diff --git a/js/test/typescript/Ice/proxy/Client.ts b/js/test/typescript/Ice/proxy/Client.ts index 90827760bc5..9dc59b49ce5 100644 --- a/js/test/typescript/Ice/proxy/Client.ts +++ b/js/test/typescript/Ice/proxy/Client.ts @@ -739,6 +739,8 @@ export class Client extends TestHelper const connection = await cl.ice_getConnection(); if(connection !== null) { + test(!cl.ice_isFixed()); + test(cl.ice_fixed(connection).ice_isFixed()); await cl.ice_fixed(connection).getContext(); test(cl.ice_secure(true).ice_fixed(connection).ice_isSecure()); test(cl.ice_facet("facet").ice_fixed(connection).ice_getFacet() == "facet"); |