summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/ReferenceFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppe/src/IceE/ReferenceFactory.cpp')
-rw-r--r--cppe/src/IceE/ReferenceFactory.cpp68
1 files changed, 53 insertions, 15 deletions
diff --git a/cppe/src/IceE/ReferenceFactory.cpp b/cppe/src/IceE/ReferenceFactory.cpp
index f2eac7cae08..e958257edeb 100644
--- a/cppe/src/IceE/ReferenceFactory.cpp
+++ b/cppe/src/IceE/ReferenceFactory.cpp
@@ -54,6 +54,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident,
const Context& context,
const string& facet,
Reference::Mode mode,
+ bool secure,
const vector<EndpointPtr>& endpoints
#ifdef ICEE_HAS_ROUTER
, const RouterInfoPtr& routerInfo
@@ -76,9 +77,9 @@ IceInternal::ReferenceFactory::create(const Identity& ident,
// Create new reference
//
#ifdef ICEE_HAS_ROUTER
- return new DirectReference(_instance, ident, context, facet, mode, endpoints, routerInfo);
+ return new DirectReference(_instance, ident, context, facet, mode, secure, endpoints, routerInfo);
#else
- return new DirectReference(_instance, ident, context, facet, mode, endpoints);
+ return new DirectReference(_instance, ident, context, facet, mode, secure, endpoints);
#endif
}
@@ -89,6 +90,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident,
const Context& context,
const string& facet,
Reference::Mode mode,
+ bool secure,
const string& adapterId
#ifdef ICEE_HAS_ROUTER
, const RouterInfoPtr& routerInfo
@@ -111,9 +113,9 @@ IceInternal::ReferenceFactory::create(const Identity& ident,
// Create new reference
//
#ifdef ICEE_HAS_ROUTER
- return new IndirectReference(_instance, ident, context, facet, mode, adapterId, routerInfo, locatorInfo);
+ return new IndirectReference(_instance, ident, context, facet, mode, secure, adapterId, routerInfo, locatorInfo);
#else
- return new IndirectReference(_instance, ident, context, facet, mode, adapterId, locatorInfo);
+ return new IndirectReference(_instance, ident, context, facet, mode, secure, adapterId, locatorInfo);
#endif
}
@@ -238,6 +240,7 @@ IceInternal::ReferenceFactory::create(const string& str)
string facet;
Reference::Mode mode = Reference::ModeTwoway;
+ bool secure = false;
string adapter;
while(true)
@@ -370,6 +373,42 @@ IceInternal::ReferenceFactory::create(const string& str)
break;
}
+ case 'd':
+ {
+ if(!argument.empty())
+ {
+ ProxyParseException ex(__FILE__, __LINE__);
+ ex.str = str;
+ throw ex;
+ }
+ mode = Reference::ModeDatagram;
+ break;
+ }
+
+ case 'D':
+ {
+ if(!argument.empty())
+ {
+ ProxyParseException ex(__FILE__, __LINE__);
+ ex.str = str;
+ throw ex;
+ }
+ mode = Reference::ModeBatchDatagram;
+ break;
+ }
+
+ case 's':
+ {
+ if(!argument.empty())
+ {
+ ProxyParseException ex(__FILE__, __LINE__);
+ ex.str = str;
+ throw ex;
+ }
+ secure = true;
+ break;
+ }
+
default:
{
ProxyParseException ex(__FILE__, __LINE__);
@@ -390,9 +429,9 @@ IceInternal::ReferenceFactory::create(const string& str)
{
#ifdef ICEE_HAS_LOCATOR
# ifdef ICEE_HAS_ROUTER
- return create(ident, Context(), facet, mode, "", routerInfo, locatorInfo);
+ return create(ident, Context(), facet, mode, secure, "", routerInfo, locatorInfo);
# else
- return create(ident, Context(), facet, mode, "", locatorInfo);
+ return create(ident, Context(), facet, mode, secure, "", locatorInfo);
# endif
#else
ProxyParseException ex(__FILE__, __LINE__);
@@ -449,9 +488,9 @@ IceInternal::ReferenceFactory::create(const string& str)
}
#ifdef ICEE_HAS_ROUTER
- return create(ident, Context(), facet, mode, endpoints , routerInfo);
+ return create(ident, Context(), facet, mode, secure, endpoints , routerInfo);
#else
- return create(ident, Context(), facet, mode, endpoints);
+ return create(ident, Context(), facet, mode, secure, endpoints);
#endif
break;
}
@@ -495,9 +534,9 @@ IceInternal::ReferenceFactory::create(const string& str)
}
#ifdef ICEE_HAS_ROUTER
- return create(ident, Context(), facet, mode, adapter, routerInfo, locatorInfo);
+ return create(ident, Context(), facet, mode, secure, adapter, routerInfo, locatorInfo);
#else
- return create(ident, Context(), facet, mode, adapter, locatorInfo);
+ return create(ident, Context(), facet, mode, secure, adapter, locatorInfo);
#endif
break;
}
@@ -569,9 +608,9 @@ IceInternal::ReferenceFactory::create(const Identity& ident, BasicStream* s)
endpoints.push_back(endpoint);
}
#ifdef ICEE_HAS_ROUTER
- return create(ident, Context(), facet, mode, endpoints, routerInfo);
+ return create(ident, Context(), facet, mode, secure, endpoints, routerInfo);
#else
- return create(ident, Context(), facet, mode, endpoints);
+ return create(ident, Context(), facet, mode, secure, endpoints);
#endif
}
else
@@ -580,10 +619,9 @@ IceInternal::ReferenceFactory::create(const Identity& ident, BasicStream* s)
LocatorInfoPtr locatorInfo = _instance->locatorManager()->get(getDefaultLocator());
s->read(adapterId);
# ifdef ICEE_HAS_ROUTER
- return create(ident, Context(), facet, mode, adapterId, routerInfo, locatorInfo);
-
+ return create(ident, Context(), facet, mode, secure, adapterId, routerInfo, locatorInfo);
# else
- return create(ident, Context(), facet, mode, adapterId, locatorInfo);
+ return create(ident, Context(), facet, mode, secure, adapterId, locatorInfo);
# endif
#else
throw ProxyUnmarshalException(__FILE__, __LINE__);