summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ReferenceFactory.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-04-18 14:33:16 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-04-18 14:33:16 +0200
commit2ba4d4e0ca7aeade69ee00ab17d5fa1b69372ffc (patch)
tree0a381f9b284eb7ca5acc9bca5a97659d19874f9d /cpp/src/Ice/ReferenceFactory.cpp
parentICE-4828 - Buffer.h undeclared ptrdiff_t issue on OpenSUSE (diff)
downloadice-2ba4d4e0ca7aeade69ee00ab17d5fa1b69372ffc.tar.bz2
ice-2ba4d4e0ca7aeade69ee00ab17d5fa1b69372ffc.tar.xz
ice-2ba4d4e0ca7aeade69ee00ab17d5fa1b69372ffc.zip
Added support for encoding versioning
Diffstat (limited to 'cpp/src/Ice/ReferenceFactory.cpp')
-rw-r--r--cpp/src/Ice/ReferenceFactory.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp
index bf877e86f51..408e974541a 100644
--- a/cpp/src/Ice/ReferenceFactory.cpp
+++ b/cpp/src/Ice/ReferenceFactory.cpp
@@ -80,6 +80,8 @@ IceInternal::ReferenceFactory::create(const Identity& ident, const Ice::Connecti
return 0;
}
+ DefaultsAndOverridesPtr defaultsAndOverrides = _instance->defaultsAndOverrides();
+
//
// Create new reference
//
@@ -89,6 +91,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident, const Ice::Connecti
"", // Facet
connection->endpoint()->datagram() ? Reference::ModeDatagram : Reference::ModeTwoway,
connection->endpoint()->secure(),
+ defaultsAndOverrides->defaultEncoding,
connection);
}
@@ -654,6 +657,7 @@ IceInternal::ReferenceFactory::checkForUnknownProperties(const string& prefix)
"EndpointSelection",
"ConnectionCached",
"PreferSecure",
+ "EncodingVersion",
"LocatorCacheTimeout",
"Locator",
"Router",
@@ -723,6 +727,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident,
bool collocationOptimized = defaultsAndOverrides->defaultCollocationOptimization;
bool cacheConnection = true;
bool preferSecure = defaultsAndOverrides->defaultPreferSecure;
+ EncodingVersion encoding = defaultsAndOverrides->defaultEncoding;
Ice::EndpointSelectionType endpointSelection = defaultsAndOverrides->defaultEndpointSelection;
int locatorCacheTimeout = defaultsAndOverrides->defaultLocatorCacheTimeout;
@@ -771,6 +776,14 @@ IceInternal::ReferenceFactory::create(const Identity& ident,
property = propertyPrefix + ".PreferSecure";
preferSecure = properties->getPropertyAsIntWithDefault(property, preferSecure) > 0;
+ property = propertyPrefix + ".EncodingVersion";
+ string encodingStr = properties->getProperty(property);
+ if(!encodingStr.empty())
+ {
+ encoding = stringToEncodingVersion(encodingStr);
+ checkSupportedEncoding(encoding);
+ }
+
property = propertyPrefix + ".EndpointSelection";
if(!properties->getProperty(property).empty())
{
@@ -804,6 +817,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident,
facet,
mode,
secure,
+ encoding,
endpoints,
adapterId,
locatorInfo,