diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-01-31 17:21:12 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-01-31 17:21:12 +0100 |
commit | c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f (patch) | |
tree | a02e199af243136b4dc4a83929e8c9a185c9dcd8 /cpp/include | |
parent | Updated AutoStart description (diff) | |
download | ice-c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f.tar.bz2 ice-c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f.tar.xz ice-c3f44e70ea6a8c9bd16281f4b7e2bcd8f7bae47f.zip |
Added support for ice_fixed, ice_getTimeout, ice_getCompress methods (ICE-7996 & ICE-7976)
Diffstat (limited to 'cpp/include')
-rw-r--r-- | cpp/include/Ice/Proxy.h | 114 |
1 files changed, 94 insertions, 20 deletions
diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h index 58287e0aecc..cab5bb39956 100644 --- a/cpp/include/Ice/Proxy.h +++ b/cpp/include/Ice/Proxy.h @@ -946,20 +946,36 @@ public: bool ice_isBatchDatagram() const; /** - * Obtains a proxy that is identical to this proxy, except for compression. + * Obtains a proxy that is identical to this proxy, except for its compression setting which + * overrides the compression setting from the proxy endpoints. * @param b True enables compression for the new proxy, false disables compression. - * @return A proxy with the specified compression setting. + * @return A proxy with the specified compression override setting. */ ::std::shared_ptr<::Ice::ObjectPrx> ice_compress(bool b) const; /** - * Obtains a proxy that is identical to this proxy, except for its connection timeout setting. - * @param timeout The connection timeout for the proxy (in milliseconds). - * @return A proxy with the specified timeout. + * Obtains the compression override setting of this proxy. + * @return The compression override setting. If nullopt is returned, no override is set. Otherwise, true + * if compression is enabled, false otherwise. + */ + ::Ice::optional<bool> ice_getCompress() const; + + /** + * Obtains a proxy that is identical to this proxy, except for its connection timeout setting + * which overrides the timeot setting from the proxy endpoints. + * @param timeout The connection timeout override for the proxy (in milliseconds). + * @return A proxy with the specified timeout override. */ ::std::shared_ptr<::Ice::ObjectPrx> ice_timeout(int timeout) const; /** + * Obtains the timeout override of this proxy. + * @return The timeout override. If nullopt is returned, no override is set. Otherwise, returns + * the timeout override value. + */ + ::Ice::optional<int> ice_getTimeout() const; + + /** * Obtains a proxy that is identical to this proxy, except for its connection ID. * @param id The connection ID for the new proxy. An empty string removes the * connection ID. @@ -974,6 +990,14 @@ public: ::std::string ice_getConnectionId() const; /** + * Obtains a proxy that is identical to this proxy, except it's a fixed proxy bound + * the given connection. + * @param connection The fixed proxy connection. + * @return A fixed proxy bound to the given connection. + */ + ::std::shared_ptr<::Ice::ObjectPrx> ice_fixed(const ::std::shared_ptr<::Ice::Connection>& connection) 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. @@ -1326,9 +1350,10 @@ public: } /** - * Obtains a proxy that is identical to this proxy, except for compression. + * Obtains a proxy that is identical to this proxy, except for its compression setting which + * overrides the compression setting from the proxy endpoints. * @param b True enables compression for the new proxy, false disables compression. - * @return A proxy with the specified compression setting. + * @return A proxy with the specified compression override setting. */ ::std::shared_ptr<Prx> ice_compress(bool b) const { @@ -1336,9 +1361,10 @@ public: } /** - * Obtains a proxy that is identical to this proxy, except for its connection timeout setting. - * @param timeout The connection timeout for the proxy (in milliseconds). - * @return A proxy with the specified timeout. + * Obtains a proxy that is identical to this proxy, except for its connection timeout setting + * which overrides the timeot setting from the proxy endpoints. + * @param timeout The connection timeout override for the proxy (in milliseconds). + * @return A proxy with the specified timeout override. */ ::std::shared_ptr<Prx> ice_timeout(int timeout) const { @@ -1357,6 +1383,17 @@ public: } /** + * Obtains a proxy that is identical to this proxy, except it's a fixed proxy bound + * the given connection. + * @param connection The fixed proxy connection. + * @return A fixed proxy bound to the given connection. + */ + ::std::shared_ptr<Prx> ice_fixed(const ::std::shared_ptr<::Ice::Connection>& connection) const + { + return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_fixed(connection)); + } + + /** * Obtains a proxy that is identical to this proxy, except for the encoding used to marshal * parameters. * @param version The encoding version to use to marshal request parameters. @@ -2561,20 +2598,36 @@ public: bool ice_isBatchDatagram() const; /** - * Obtains a proxy that is identical to this proxy, except for compression. + * Obtains a proxy that is identical to this proxy, except for its compression setting which + * overrides the compression setting from the proxy endpoints. * @param b True enables compression for the new proxy, false disables compression. - * @return A proxy with the specified compression setting. + * @return A proxy with the specified compression override setting. */ ::Ice::ObjectPrx ice_compress(bool b) const; /** - * Obtains a proxy that is identical to this proxy, except for its connection timeout setting. - * @param timeout The connection timeout for the proxy (in milliseconds). - * @return A proxy with the specified timeout. + * Obtains the compression override setting of this proxy. + * @return The compression override setting. If nullopt is returned, no override is set. Otherwise, true + * if compression is enabled, false otherwise. + */ + ::IceUtil::Optional<bool> ice_getCompress() const; + + /** + * Obtains a proxy that is identical to this proxy, except for its connection timeout setting + * which overrides the timeot setting from the proxy endpoints. + * @param timeout The connection timeout override for the proxy (in milliseconds). + * @return A proxy with the specified timeout override. */ ::Ice::ObjectPrx ice_timeout(int timeout) const; /** + * Obtains the timeout override of this proxy. + * @return The timeout override. If nullopt is returned, no override is set. Otherwise, returns + * the timeout override value. + */ + ::IceUtil::Optional<int> ice_getTimeout() const; + + /** * Obtains a proxy that is identical to this proxy, except for its connection ID. * @param id The connection ID for the new proxy. An empty string removes the * connection ID. @@ -2589,6 +2642,14 @@ public: ::std::string ice_getConnectionId() const; /** + * Obtains a proxy that is identical to this proxy, except it's a fixed proxy bound + * the given connection. + * @param connection The fixed proxy connection. + * @return A fixed proxy bound to the given connection. + */ + ::Ice::ObjectPrx ice_fixed(const ::Ice::ConnectionPtr& connection) 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. @@ -2964,9 +3025,10 @@ public: } /** - * Obtains a proxy that is identical to this proxy, except for compression. + * Obtains a proxy that is identical to this proxy, except for its compression setting which + * overrides the compression setting from the proxy endpoints. * @param b True enables compression for the new proxy, false disables compression. - * @return A proxy with the specified compression setting. + * @return A proxy with the specified compression override setting. */ IceInternal::ProxyHandle<Prx> ice_compress(bool b) const { @@ -2974,9 +3036,10 @@ public: } /** - * Obtains a proxy that is identical to this proxy, except for its connection timeout setting. - * @param timeout The connection timeout for the proxy (in milliseconds). - * @return A proxy with the specified timeout. + * Obtains a proxy that is identical to this proxy, except for its connection timeout setting + * which overrides the timeot setting from the proxy endpoints. + * @param timeout The connection timeout override for the proxy (in milliseconds). + * @return A proxy with the specified timeout override. */ IceInternal::ProxyHandle<Prx> ice_timeout(int timeout) const { @@ -2995,6 +3058,17 @@ public: } /** + * Obtains a proxy that is identical to this proxy, except it's a fixed proxy bound + * the given connection. + * @param connection The fixed proxy connection. + * @return A fixed proxy bound to the given connection. + */ + IceInternal::ProxyHandle<Prx> ice_fixed(const ::Ice::ConnectionPtr& connection) const + { + return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_fixed(connection).get()); + } + + /** * Obtains a proxy that is identical to this proxy, except for the encoding used to marshal * parameters. * @param version The encoding version to use to marshal request parameters. |