Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Znav
nextProxy and Endpoint Syntax
prevFiltering Proxy Endpoints

It is important to understand how proxies are influenced by Ice configuration properties and settings. The relevant properties can be classified into two categories: defaults and overrides.

On this page:

Table of Contents
maxLevel3

Proxy Default Properties

Default properties affect proxies created as the result of an Ice invocation, or by calling stringToProxy or propertyToProxy on a communicator. These properties do not influence proxies created by proxy factory methods.

For example, suppose we define the following default property:

Wiki Markup
{zcode}
Ice.Default.PreferSecure=1
{zcode}

We can verify that the property has the desired affect using the following C++ code:

Wiki Markup
{zcode:cpp}
Ice::ObjectPrx p = communicator->stringToProxy(...);
assert(p->ice_isPreferSecure());
{zcode}

Furthermore, we can verify that the property does not affect proxies returned by factory methods:

Wiki Markup
{zcode}
Ice::ObjectPrx p2 = p->ice_preferSecure(false);
assert(!p2->ice_isPreferSecure());
Ice::ObjectPrx p3 = p2->ice_oneway();
assert(!p3->ice_isPreferSecure());
{zcode}
Ztop

Proxy Override Properties

Defining an override property causes the Ice run time to ignore any equivalent proxy setting and use the override property value instead. For example, consider the following property definition:

Wiki Markup
{zcode}
Ice.Override.Secure=1
{zcode}

This property instructs the Ice run time to use only secure endpoints, producing the same semantics as calling ice_secure(true) on every proxy. However, the property does not alter the settings of an existing proxy, but rather directs the Ice run time to use secure endpoints regardless of the proxy's security setting. We can verify that this is the case using the following C++ code:

Wiki Markup
{zcode:cpp}
Ice::ObjectPrx p = communicator->stringToProxy(...);
p = p->ice_secure(false);
assert(!p->ice_isSecure()); // The security setting is retained.
{zcode}
Ztop
See Also
Zret
Znav
nextProxy and Endpoint Syntax
prevFiltering Proxy Endpoints