summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-06-21 21:10:51 +0200
committerJose <jose@zeroc.com>2019-06-21 21:11:22 +0200
commit004138a45e1dc99c7a3ed61d6ee000b6638ae325 (patch)
treebfb9d6c9ae5f79b4fcf9ea7726bed0290497c473
parentFixed incorrect comment for ice_flushBatchRequestsAsync. Fixes #379. (diff)
downloadice-004138a45e1dc99c7a3ed61d6ee000b6638ae325.tar.bz2
ice-004138a45e1dc99c7a3ed61d6ee000b6638ae325.tar.xz
ice-004138a45e1dc99c7a3ed61d6ee000b6638ae325.zip
Add ice_isFixed - Close #356
-rw-r--r--cpp/include/Ice/Proxy.h12
-rw-r--r--cpp/src/Ice/Proxy.cpp6
-rw-r--r--cpp/test/Ice/proxy/AllTests.cpp2
-rw-r--r--csharp/src/Ice/Proxy.cs17
-rw-r--r--csharp/test/Ice/proxy/AllTests.cs2
-rw-r--r--java-compat/src/Ice/src/main/java/Ice/ObjectPrx.java7
-rw-r--r--java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelperBase.java11
-rw-r--r--java-compat/test/src/main/java/test/Ice/proxy/AllTests.java2
-rw-r--r--java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java7
-rw-r--r--java/src/Ice/src/main/java/com/zeroc/Ice/_ObjectPrxI.java5
-rw-r--r--java/test/src/main/java/test/Ice/proxy/AllTests.java2
-rw-r--r--js/src/Ice/ObjectPrx.d.ts7
-rw-r--r--js/src/Ice/ObjectPrx.js5
-rw-r--r--js/test/Ice/proxy/Client.js2
-rw-r--r--js/test/typescript/Ice/proxy/Client.ts2
-rw-r--r--matlab/lib/+Ice/ObjectPrx.m9
-rw-r--r--matlab/src/ObjectPrx.cpp6
-rw-r--r--matlab/src/ice.h1
-rw-r--r--matlab/test/Ice/proxy/AllTests.m2
-rw-r--r--objective-c/include/objc/Ice/Proxy.h1
-rw-r--r--objective-c/src/Ice/Proxy.mm4
-rw-r--r--objective-c/test/Ice/proxy/AllTests.m2
-rw-r--r--php/src/php5/Proxy.cpp23
-rw-r--r--php/src/php7/Proxy.cpp23
-rw-r--r--php/test/Ice/proxy/Client.php2
-rw-r--r--python/modules/IcePy/Proxy.cpp25
-rw-r--r--python/test/Ice/proxy/AllTests.py2
-rw-r--r--ruby/src/IceRuby/Proxy.cpp14
-rw-r--r--ruby/test/Ice/proxy/AllTests.rb2
29 files changed, 205 insertions, 0 deletions
diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h
index a486d004e84..a5bf67c494c 100644
--- a/cpp/include/Ice/Proxy.h
+++ b/cpp/include/Ice/Proxy.h
@@ -993,6 +993,12 @@ public:
::std::shared_ptr<::Ice::ObjectPrx> ice_fixed(const ::std::shared_ptr<::Ice::Connection>& connection) const;
/**
+ * Determines whether this proxy is a fixed proxy.
+ * @return True if this proxy is a fixed proxy, false otherwise.
+ */
+ bool ice_isFixed() const;
+
+ /**
* 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 connection for this proxy.
@@ -2659,6 +2665,12 @@ public:
::Ice::ObjectPrx ice_fixed(const ::Ice::ConnectionPtr& connection) const;
/**
+ * Determines whether this proxy is a fixed proxy.
+ * @return True if this proxy is a fixed proxy, false otherwise.
+ */
+ bool ice_isFixed() const;
+
+ /**
* 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 connection for this proxy.
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index f2b6e188ceb..76b03fa86ff 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -1287,6 +1287,12 @@ ICE_OBJECT_PRX::ice_fixed(const ::Ice::ConnectionPtr& connection) const
}
}
+bool
+ICE_OBJECT_PRX::ice_isFixed() const
+{
+ return FixedReferencePtr::dynamicCast(_reference);
+}
+
ConnectionPtr
ICE_OBJECT_PRX::ice_getCachedConnection() const
{
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp
index 147726defb0..a923bf398fb 100644
--- a/cpp/test/Ice/proxy/AllTests.cpp
+++ b/cpp/test/Ice/proxy/AllTests.cpp
@@ -1155,7 +1155,9 @@ allTests(Test::TestHelper* helper)
Ice::ConnectionPtr connection = cl->ice_getConnection();
if(connection)
{
+ test(!cl->ice_isFixed());
Test::MyClassPrxPtr prx = cl->ice_fixed(connection); // Test factory method return type
+ test(prx->ice_isFixed());
prx->ice_ping();
test(cl->ice_secure(true)->ice_fixed(connection)->ice_isSecure());
test(cl->ice_facet("facet")->ice_fixed(connection)->ice_getFacet() == "facet");
diff --git a/csharp/src/Ice/Proxy.cs b/csharp/src/Ice/Proxy.cs
index 1de18d13ce5..8c8fd09b1d6 100644
--- a/csharp/src/Ice/Proxy.cs
+++ b/csharp/src/Ice/Proxy.cs
@@ -706,6 +706,13 @@ namespace Ice
ObjectPrx ice_fixed(Ice.Connection connection);
/// <summary>
+ /// Returns whether this proxy is a fixed proxy.
+ /// </summary>
+ /// <returns>True if this is a fixed proxy, false otherwise.
+ /// </returns>
+ bool ice_isFixed();
+
+ /// <summary>
/// Returns the Connection for this proxy. If the proxy does not yet have an established connection,
/// it first attempts to create a connection.
/// </summary>
@@ -2186,6 +2193,16 @@ namespace Ice
}
}
+ /// <summary>
+ /// Returns whether this proxy is a fixed proxy.
+ /// </summary>
+ /// <returns>True if this is a fixed proxy, false otherwise.
+ /// </returns>
+ public bool ice_isFixed()
+ {
+ return _reference is IceInternal.FixedReference;
+ }
+
private class ProxyGetConnectionAsyncCallback : ProxyAsyncResultCompletionCallback<Callback_Object_ice_getConnection>
{
public ProxyGetConnectionAsyncCallback(ObjectPrxHelperBase proxy, string operation, object cookie,
diff --git a/csharp/test/Ice/proxy/AllTests.cs b/csharp/test/Ice/proxy/AllTests.cs
index e8ccea04b44..c28e31cc7ff 100644
--- a/csharp/test/Ice/proxy/AllTests.cs
+++ b/csharp/test/Ice/proxy/AllTests.cs
@@ -808,7 +808,9 @@ namespace Ice
Ice.Connection connection = cl.ice_getConnection();
if(connection != null)
{
+ test(!cl.ice_isFixed());
Test.MyClassPrx prx =(Test.MyClassPrx)cl.ice_fixed(connection);
+ test(prx.ice_isFixed());
prx.ice_ping();
test(cl.ice_secure(true).ice_fixed(connection).ice_isSecure());
test(cl.ice_facet("facet").ice_fixed(connection).ice_getFacet().Equals("facet"));
diff --git a/java-compat/src/Ice/src/main/java/Ice/ObjectPrx.java b/java-compat/src/Ice/src/main/java/Ice/ObjectPrx.java
index 65d4a3e24bf..4c265c3abec 100644
--- a/java-compat/src/Ice/src/main/java/Ice/ObjectPrx.java
+++ b/java-compat/src/Ice/src/main/java/Ice/ObjectPrx.java
@@ -1112,6 +1112,13 @@ public interface ObjectPrx
ObjectPrx ice_fixed(Ice.Connection connection);
/**
+ * Returns whether this proxy is a fixed proxy.
+ *
+ * @return <code>true</code> if this is a fixed proxy, <code>false</code> otherwise.
+ **/
+ boolean ice_isFixed();
+
+ /**
* Returns the {@link Connection} for this proxy. If the proxy does not yet have an established connection,
* it first attempts to create a connection.
*
diff --git a/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelperBase.java b/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelperBase.java
index 28789a6158c..70ee6a66273 100644
--- a/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelperBase.java
+++ b/java-compat/src/Ice/src/main/java/Ice/ObjectPrxHelperBase.java
@@ -2311,6 +2311,17 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable
}
/**
+ * Returns whether this proxy is a fixed proxy.
+ *
+ * @return <code>true</code> if this is a fixed proxy, <code>false</code> otherwise.
+ **/
+ @Override
+ public final boolean ice_isFixed()
+ {
+ return _reference instanceof IceInternal.FixedReference;
+ }
+
+ /**
* Returns the {@link Connection} for this proxy. If the proxy does not yet have an established connection,
* it first attempts to create a connection.
*
diff --git a/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java b/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java
index 57ebcd10180..a94cc224fa2 100644
--- a/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java
+++ b/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java
@@ -901,7 +901,9 @@ public class AllTests
Ice.Connection connection = cl.ice_getConnection();
if(connection != null)
{
+ test(!cl.ice_isFixed());
MyClassPrx prx = (MyClassPrx)cl.ice_fixed(connection); // Test proxy return type.
+ test(prx.ice_isFixed());
prx.ice_ping();
test(cl.ice_secure(true).ice_fixed(connection).ice_isSecure());
test(cl.ice_facet("facet").ice_fixed(connection).ice_getFacet().equals("facet"));
diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java b/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java
index 23968550b11..f95213fa2d3 100644
--- a/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java
+++ b/java/src/Ice/src/main/java/com/zeroc/Ice/ObjectPrx.java
@@ -330,6 +330,13 @@ public interface ObjectPrx
}
/**
+ * Returns whether this proxy is a fixed proxy.
+ *
+ * @return <code>true</code> if this is a fixed proxy, <code>false</code> otherwise.
+ **/
+ boolean ice_isFixed();
+
+ /**
* Returns a proxy that is identical to this proxy, except for the locator cache timeout.
*
* @param newTimeout The new locator cache timeout (in seconds).
diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/_ObjectPrxI.java b/java/src/Ice/src/main/java/com/zeroc/Ice/_ObjectPrxI.java
index 867193fced0..e2b70a29539 100644
--- a/java/src/Ice/src/main/java/com/zeroc/Ice/_ObjectPrxI.java
+++ b/java/src/Ice/src/main/java/com/zeroc/Ice/_ObjectPrxI.java
@@ -248,6 +248,11 @@ public class _ObjectPrxI implements ObjectPrx, java.io.Serializable
return _reference.getEndpointSelection();
}
+ public boolean ice_isFixed()
+ {
+ return _reference instanceof com.zeroc.IceInternal.FixedReference;
+ }
+
public boolean ice_isSecure()
{
return _reference.getSecure();
diff --git a/java/test/src/main/java/test/Ice/proxy/AllTests.java b/java/test/src/main/java/test/Ice/proxy/AllTests.java
index 8272a56c105..c1fdd70b899 100644
--- a/java/test/src/main/java/test/Ice/proxy/AllTests.java
+++ b/java/test/src/main/java/test/Ice/proxy/AllTests.java
@@ -839,7 +839,9 @@ public class AllTests
com.zeroc.Ice.Connection connection = cl.ice_getConnection();
if(connection != null)
{
+ test(!cl.ice_isFixed());
MyClassPrx prx = cl.ice_fixed(connection); // Test proxy return type.
+ test(prx.ice_isFixed());
prx.ice_ping();
test(cl.ice_secure(true).ice_fixed(connection).ice_isSecure());
test(cl.ice_facet("facet").ice_fixed(connection).ice_getFacet().equals("facet"));
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");
diff --git a/matlab/lib/+Ice/ObjectPrx.m b/matlab/lib/+Ice/ObjectPrx.m
index 841b8567804..d5b85a74258 100644
--- a/matlab/lib/+Ice/ObjectPrx.m
+++ b/matlab/lib/+Ice/ObjectPrx.m
@@ -101,6 +101,7 @@ classdef ObjectPrx < IceInternal.WrapperObject
% ice_getTimeout - Obtains the timeout override of this proxy.
% ice_fixed - Obtains a proxy that is identical to this proxy, except it's
% a fixed proxy bound to the given connection.
+ % ice_isFixed - Returns whether this proxy is a fixed proxy.
% ice_getConnection - Returns the Connection for this proxy.
% ice_getConnectionAsync - Returns the Connection for this proxy.
% ice_getCachedConnection - Returns the cached Connection for this
@@ -886,6 +887,14 @@ classdef ObjectPrx < IceInternal.WrapperObject
r = obj.factory_('ice_fixed', true, connection.iceGetImpl());
end
+ function r = ice_isFixed(obj)
+ % ice_isFixed - Determines whether this proxy is a fixed proxy.
+ %
+ % Returns (logical) - True if this proxy is a fixed proxy, false otherwise.
+
+ r = obj.iceCallWithResult('ice_isFixed');
+ end
+
function r = ice_getConnection(obj)
% ice_getConnection - Returns the Connection for this proxy. If the
% proxy does not yet have an established connection, it first
diff --git a/matlab/src/ObjectPrx.cpp b/matlab/src/ObjectPrx.cpp
index e880f7471d8..7ce156f6c65 100644
--- a/matlab/src/ObjectPrx.cpp
+++ b/matlab/src/ObjectPrx.cpp
@@ -1019,6 +1019,12 @@ Ice_ObjectPrx_ice_fixed(void* self, void** r, void* connection)
}
mxArray*
+Ice_ObjectPrx_ice_isFixed(void* self)
+{
+ return createResultValue(createBool(deref<Ice::ObjectPrx>(self)->ice_isFixed()));
+}
+
+mxArray*
Ice_ObjectPrx_ice_getConnection(void* self, void** r)
{
*r = 0;
diff --git a/matlab/src/ice.h b/matlab/src/ice.h
index ec70ee590b6..44ed95579eb 100644
--- a/matlab/src/ice.h
+++ b/matlab/src/ice.h
@@ -102,6 +102,7 @@ ICE_MATLAB_API mxArray* Ice_ObjectPrx_ice_getCompress(void*);
ICE_MATLAB_API mxArray* Ice_ObjectPrx_ice_timeout(void*, void**, int);
ICE_MATLAB_API mxArray* Ice_ObjectPrx_ice_getTimeout(void*);
ICE_MATLAB_API mxArray* Ice_ObjectPrx_ice_fixed(void*, void**, void*);
+ICE_MATLAB_API mxArray* Ice_ObjectPrx_ice_isFixed(void* self);
ICE_MATLAB_API mxArray* Ice_ObjectPrx_ice_getConnection(void*, void**);
ICE_MATLAB_API mxArray* Ice_ObjectPrx_ice_getConnectionAsync(void*, void**);
ICE_MATLAB_API mxArray* Ice_ObjectPrx_ice_getCachedConnection(void*, void**);
diff --git a/matlab/test/Ice/proxy/AllTests.m b/matlab/test/Ice/proxy/AllTests.m
index 7abac3797b0..09923a53528 100644
--- a/matlab/test/Ice/proxy/AllTests.m
+++ b/matlab/test/Ice/proxy/AllTests.m
@@ -674,6 +674,8 @@ classdef AllTests
fprintf('testing ice_fixed... ');
connection = cl.ice_getConnection();
if ~isempty(connection)
+ assert(~(cl.ice_isFixed()));
+ assert(cl.ice_fixed(connection).ice_isFixed());
prx = cl.ice_fixed(connection); % Test factory method return type
prx.ice_ping();
assert(cl.ice_secure(true).ice_fixed(connection).ice_isSecure());
diff --git a/objective-c/include/objc/Ice/Proxy.h b/objective-c/include/objc/Ice/Proxy.h
index 64ae023b3e1..24b5a0af9a7 100644
--- a/objective-c/include/objc/Ice/Proxy.h
+++ b/objective-c/include/objc/Ice/Proxy.h
@@ -145,6 +145,7 @@ ICE_API @protocol ICEObjectPrx <NSObject, NSCopying>
-(id) ice_timeout:(int)timeout;
-(id) ice_getTimeout;
-(id) ice_fixed:(id<ICEConnection>)connection;
+-(BOOL) ice_isFixed;
-(id) ice_connectionId:(NSString*)connectionId;
-(id<ICEConnection>) ice_getConnection;
-(id<ICEAsyncResult>) begin_ice_getConnection;
diff --git a/objective-c/src/Ice/Proxy.mm b/objective-c/src/Ice/Proxy.mm
index fab4ceb94c1..a426755e27c 100644
--- a/objective-c/src/Ice/Proxy.mm
+++ b/objective-c/src/Ice/Proxy.mm
@@ -1629,6 +1629,10 @@ BOOL _returnsData;
@throw nsex;
return nil; // Keep the compiler happy.
}
+-(BOOL) ice_isFixed
+{
+ return OBJECTPRX->ice_isFixed();
+}
-(id) ice_connectionId:(NSString*)connectionId
{
return [[self class] iceObjectPrxWithObjectPrx:OBJECTPRX->ice_connectionId(fromNSString(connectionId))];
diff --git a/objective-c/test/Ice/proxy/AllTests.m b/objective-c/test/Ice/proxy/AllTests.m
index 50fc2cbb7bd..8519772a1b3 100644
--- a/objective-c/test/Ice/proxy/AllTests.m
+++ b/objective-c/test/Ice/proxy/AllTests.m
@@ -714,6 +714,8 @@ proxyAllTests(id<ICECommunicator> communicator)
id<ICEConnection> connection = [cl ice_getConnection];
if(connection != nil)
{
+ test(![cl ice_isFixed]);
+ test([[cl ice_fixed:connection] ice_isFixed]);
[[cl ice_fixed:connection] getContext];
test([[[cl ice_secure:YES] ice_fixed:connection] ice_isSecure]);
test([[[[cl ice_facet:@"facet"] ice_fixed:connection] ice_getFacet] isEqualToString:@"facet"]);
diff --git a/php/src/php5/Proxy.cpp b/php/src/php5/Proxy.cpp
index ccdd4a1873a..f398b8f3d20 100644
--- a/php/src/php5/Proxy.cpp
+++ b/php/src/php5/Proxy.cpp
@@ -1348,6 +1348,28 @@ ZEND_METHOD(Ice_ObjectPrx, ice_fixed)
}
}
+ZEND_METHOD(Ice_ObjectPrx, ice_isFixed)
+{
+ if(ZEND_NUM_ARGS() != 0)
+ {
+ WRONG_PARAM_COUNT;
+ }
+
+ ProxyPtr _this = Wrapper<ProxyPtr>::value(getThis() TSRMLS_CC);
+ assert(_this);
+
+ try
+ {
+ bool b = _this->proxy->ice_isFixed();
+ RETURN_BOOL(b ? 1 : 0);
+ }
+ catch(const IceUtil::Exception& ex)
+ {
+ throwException(ex TSRMLS_CC);
+ RETURN_FALSE;
+ }
+}
+
ZEND_METHOD(Ice_ObjectPrx, ice_getConnection)
{
if(ZEND_NUM_ARGS() != 0)
@@ -1789,6 +1811,7 @@ static zend_function_entry _proxyMethods[] =
ZEND_ME(Ice_ObjectPrx, ice_getInvocationTimeout, ICE_NULLPTR, ZEND_ACC_PUBLIC)
ZEND_ME(Ice_ObjectPrx, ice_connectionId, ICE_NULLPTR, ZEND_ACC_PUBLIC)
ZEND_ME(Ice_ObjectPrx, ice_fixed, ICE_NULLPTR, ZEND_ACC_PUBLIC)
+ ZEND_ME(Ice_ObjectPrx, ice_isFixed, ICE_NULLPTR, ZEND_ACC_PUBLIC)
ZEND_ME(Ice_ObjectPrx, ice_getConnection, ICE_NULLPTR, ZEND_ACC_PUBLIC)
ZEND_ME(Ice_ObjectPrx, ice_getCachedConnection, ICE_NULLPTR, ZEND_ACC_PUBLIC)
ZEND_ME(Ice_ObjectPrx, ice_flushBatchRequests, ICE_NULLPTR, ZEND_ACC_PUBLIC)
diff --git a/php/src/php7/Proxy.cpp b/php/src/php7/Proxy.cpp
index 898ff63ae45..2e83a1d5378 100644
--- a/php/src/php7/Proxy.cpp
+++ b/php/src/php7/Proxy.cpp
@@ -1335,6 +1335,28 @@ ZEND_METHOD(Ice_ObjectPrx, ice_fixed)
}
}
+ZEND_METHOD(Ice_ObjectPrx, ice_isFixed)
+{
+ if(ZEND_NUM_ARGS() != 0)
+ {
+ WRONG_PARAM_COUNT;
+ }
+
+ ProxyPtr _this = Wrapper<ProxyPtr>::value(getThis());
+ assert(_this);
+
+ try
+ {
+ bool b = _this->proxy->ice_isFixed();
+ RETURN_BOOL(b ? 1 : 0);
+ }
+ catch(const IceUtil::Exception& ex)
+ {
+ throwException(ex);
+ RETURN_FALSE;
+ }
+}
+
ZEND_METHOD(Ice_ObjectPrx, ice_getConnection)
{
if(ZEND_NUM_ARGS() != 0)
@@ -1742,6 +1764,7 @@ static zend_function_entry _proxyMethods[] =
ZEND_ME(Ice_ObjectPrx, ice_getInvocationTimeout, ICE_NULLPTR, ZEND_ACC_PUBLIC)
ZEND_ME(Ice_ObjectPrx, ice_connectionId, ICE_NULLPTR, ZEND_ACC_PUBLIC)
ZEND_ME(Ice_ObjectPrx, ice_fixed, ICE_NULLPTR, ZEND_ACC_PUBLIC)
+ ZEND_ME(Ice_ObjectPrx, ice_isFixed, ICE_NULLPTR, ZEND_ACC_PUBLIC)
ZEND_ME(Ice_ObjectPrx, ice_getConnection, ICE_NULLPTR, ZEND_ACC_PUBLIC)
ZEND_ME(Ice_ObjectPrx, ice_getCachedConnection, ICE_NULLPTR, ZEND_ACC_PUBLIC)
ZEND_ME(Ice_ObjectPrx, ice_flushBatchRequests, ICE_NULLPTR, ZEND_ACC_PUBLIC)
diff --git a/php/test/Ice/proxy/Client.php b/php/test/Ice/proxy/Client.php
index 093177041c5..a4a7689376f 100644
--- a/php/test/Ice/proxy/Client.php
+++ b/php/test/Ice/proxy/Client.php
@@ -509,6 +509,8 @@ function allTests($helper)
$connection = $cl->ice_getConnection();
if($connection != null)
{
+ test(!$cl->ice_isFixed());
+ test($cl->ice_fixed($connection)->ice_isFixed());
$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/python/modules/IcePy/Proxy.cpp b/python/modules/IcePy/Proxy.cpp
index d1733d6d993..c558dd315e8 100644
--- a/python/modules/IcePy/Proxy.cpp
+++ b/python/modules/IcePy/Proxy.cpp
@@ -1866,6 +1866,29 @@ proxyIceFixed(ProxyObject* self, PyObject* args)
extern "C"
#endif
static PyObject*
+proxyIceIsFixed(ProxyObject* self, PyObject* /*args*/)
+{
+ assert(self->proxy);
+
+ PyObject* b;
+ try
+ {
+ b = (*self->proxy)->ice_isFixed() ? getTrue() : getFalse();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ setPythonException(ex);
+ return 0;
+ }
+
+ Py_INCREF(b);
+ return b;
+}
+
+#ifdef WIN32
+extern "C"
+#endif
+static PyObject*
proxyIceGetConnection(ProxyObject* self, PyObject* /*args*/)
{
assert(self->proxy);
@@ -2763,6 +2786,8 @@ static PyMethodDef ProxyMethods[] =
PyDoc_STR(STRCAST("ice_connectionId(string) -> Ice.ObjectPrx")) },
{ STRCAST("ice_fixed"), reinterpret_cast<PyCFunction>(proxyIceFixed), METH_VARARGS,
PyDoc_STR(STRCAST("ice_fixed(Ice.Connection) -> Ice.ObjectPrx")) },
+ { STRCAST("ice_isFixed"), reinterpret_cast<PyCFunction>(proxyIceIsFixed), METH_NOARGS,
+ PyDoc_STR(STRCAST("ice_isFixed() -> bool")) },
{ STRCAST("ice_getConnection"), reinterpret_cast<PyCFunction>(proxyIceGetConnection), METH_NOARGS,
PyDoc_STR(STRCAST("ice_getConnection() -> Ice.Connection")) },
{ STRCAST("ice_getConnectionAsync"), reinterpret_cast<PyCFunction>(proxyIceGetConnectionAsync),
diff --git a/python/test/Ice/proxy/AllTests.py b/python/test/Ice/proxy/AllTests.py
index 7f4781b55d2..e5bc5b9339f 100644
--- a/python/test/Ice/proxy/AllTests.py
+++ b/python/test/Ice/proxy/AllTests.py
@@ -654,6 +654,8 @@ def allTests(helper, communicator, collocated):
sys.stdout.flush()
connection = cl.ice_getConnection()
if connection != None:
+ test(cl.ice_isFixed() == False)
+ test(cl.ice_fixed(connection).ice_isFixed())
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/ruby/src/IceRuby/Proxy.cpp b/ruby/src/IceRuby/Proxy.cpp
index d5b1c175baa..c06588261fe 100644
--- a/ruby/src/IceRuby/Proxy.cpp
+++ b/ruby/src/IceRuby/Proxy.cpp
@@ -921,6 +921,19 @@ IceRuby_ObjectPrx_ice_fixed(VALUE self, VALUE con)
extern "C"
VALUE
+IceRuby_ObjectPrx_ice_isFixed(VALUE self)
+{
+ ICE_RUBY_TRY
+ {
+ Ice::ObjectPrx p = getProxy(self);
+ return p->ice_isFixed() ? Qtrue : Qfalse;
+ }
+ ICE_RUBY_CATCH
+ return Qnil;
+}
+
+extern "C"
+VALUE
IceRuby_ObjectPrx_ice_getConnection(VALUE self)
{
ICE_RUBY_TRY
@@ -1329,6 +1342,7 @@ IceRuby::initProxy(VALUE iceModule)
rb_define_method(_proxyClass, "ice_getTimeout", CAST_METHOD(IceRuby_ObjectPrx_ice_getTimeout), 0);
rb_define_method(_proxyClass, "ice_connectionId", CAST_METHOD(IceRuby_ObjectPrx_ice_connectionId), 1);
rb_define_method(_proxyClass, "ice_fixed", CAST_METHOD(IceRuby_ObjectPrx_ice_fixed), 1);
+ rb_define_method(_proxyClass, "ice_isFixed", CAST_METHOD(IceRuby_ObjectPrx_ice_isFixed), 0);
rb_define_method(_proxyClass, "ice_getConnection", CAST_METHOD(IceRuby_ObjectPrx_ice_getConnection), 0);
rb_define_method(_proxyClass, "ice_getCachedConnection", CAST_METHOD(IceRuby_ObjectPrx_ice_getCachedConnection), 0);
rb_define_method(_proxyClass, "ice_flushBatchRequests", CAST_METHOD(IceRuby_ObjectPrx_ice_flushBatchRequests), 0);
diff --git a/ruby/test/Ice/proxy/AllTests.rb b/ruby/test/Ice/proxy/AllTests.rb
index cde9fef06b8..3a923e4d0d1 100644
--- a/ruby/test/Ice/proxy/AllTests.rb
+++ b/ruby/test/Ice/proxy/AllTests.rb
@@ -651,6 +651,8 @@ def allTests(helper, communicator)
STDOUT.flush
connection = cl.ice_getConnection()
if connection != nil
+ test(!cl.ice_isFixed())
+ test(cl.ice_fixed(connection).ice_isFixed())
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")