summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Exception.cpp4
-rw-r--r--cpp/src/Ice/LocatorInfo.cpp2
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp3
-rw-r--r--cpp/src/IcePack/ActivatorI.cpp4
-rw-r--r--cpp/src/IcePack/AdapterRegistryI.cpp28
-rw-r--r--cpp/src/IcePack/AdapterRegistryI.h2
-rw-r--r--cpp/src/IcePack/AdminI.cpp14
-rw-r--r--cpp/src/IcePack/AdminI.h6
-rw-r--r--cpp/src/IcePack/ApplicationBuilder.cpp4
-rw-r--r--cpp/src/IcePack/Internal.ice22
-rw-r--r--cpp/src/IcePack/LocatorI.cpp9
-rw-r--r--cpp/src/IcePack/LocatorI.h2
-rw-r--r--cpp/src/IcePack/LocatorRegistryI.cpp6
-rw-r--r--cpp/src/IcePack/NodeRegistryI.cpp4
-rw-r--r--cpp/src/IcePack/Parser.cpp8
-rw-r--r--cpp/src/IcePack/ServerAdapterI.cpp12
-rw-r--r--cpp/src/IcePack/ServerBuilder.cpp36
-rw-r--r--cpp/src/IcePack/ServerBuilder.h2
-rw-r--r--cpp/src/IcePack/ServerDeployerI.cpp4
-rw-r--r--cpp/src/IcePack/ServerDeployerI.h2
-rw-r--r--cpp/src/IcePack/ServerFactory.cpp18
21 files changed, 95 insertions, 97 deletions
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp
index 7264ad82e9c..0f578d38a05 100644
--- a/cpp/src/Ice/Exception.cpp
+++ b/cpp/src/Ice/Exception.cpp
@@ -92,10 +92,10 @@ Ice::ObjectAdapterDeactivatedException::ice_print(ostream& out) const
}
void
-Ice::ObjectAdapterNameInUseException::ice_print(ostream& out) const
+Ice::ObjectAdapterIdInUseException::ice_print(ostream& out) const
{
Exception::ice_print(out);
- out << ":\nobject adapter name `" << name << "' already in use";
+ out << ":\nobject adapter `" << name << "' uses an id `" << id << "' which is already in use";
}
void
diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp
index 9456650ee47..174fb756d3a 100644
--- a/cpp/src/Ice/LocatorInfo.cpp
+++ b/cpp/src/Ice/LocatorInfo.cpp
@@ -243,7 +243,7 @@ IceInternal::LocatorInfo::getEndpoints(const ReferencePtr& ref, bool& cached)
//
try
{
- ObjectPrx object = _locator->findAdapterByName(ref->adapterId);
+ ObjectPrx object = _locator->findAdapterById(ref->adapterId);
if(object)
{
endpoints = object->__reference()->endpoints;
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index f8c12e5ca43..cdc3f5d4535 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -92,7 +92,8 @@ Ice::ObjectAdapterI::activate()
}
catch(const Ice::AdapterAlreadyActive&)
{
- ObjectAdapterNameInUseException ex(__FILE__, __LINE__);
+ ObjectAdapterIdInUseException ex(__FILE__, __LINE__);
+ ex.id = _id;
ex.name = _name;
throw ex;
}
diff --git a/cpp/src/IcePack/ActivatorI.cpp b/cpp/src/IcePack/ActivatorI.cpp
index 76cb1f88aa5..b2f85b2e66b 100644
--- a/cpp/src/IcePack/ActivatorI.cpp
+++ b/cpp/src/IcePack/ActivatorI.cpp
@@ -166,14 +166,14 @@ IcePack::ActivatorI::activate(const ServerPtr& server)
//
// Compute arguments.
//
- int argc = server->description.theArgs.size() + _propertiesOverride.size() + 3;
+ int argc = server->description.args.size() + _propertiesOverride.size() + 3;
char** argv = static_cast<char**>(malloc(argc * sizeof(char*)));
argv[0] = strdup(path.c_str());
unsigned int i = 0;
vector<string>::const_iterator q;
- for(q = server->description.theArgs.begin(); q != server->description.theArgs.end(); ++q, ++i)
+ for(q = server->description.args.begin(); q != server->description.args.end(); ++q, ++i)
{
argv[i + 1] = strdup(q->c_str());
}
diff --git a/cpp/src/IcePack/AdapterRegistryI.cpp b/cpp/src/IcePack/AdapterRegistryI.cpp
index ece9c7198eb..d0647d7cfe4 100644
--- a/cpp/src/IcePack/AdapterRegistryI.cpp
+++ b/cpp/src/IcePack/AdapterRegistryI.cpp
@@ -25,9 +25,9 @@ IcePack::AdapterRegistryI::AdapterRegistryI(const Freeze::DBPtr& db, const Trace
}
void
-IcePack::AdapterRegistryI::add(const string& name, const AdapterPrx& adapter, const Ice::Current&)
+IcePack::AdapterRegistryI::add(const string& id, const AdapterPrx& adapter, const Ice::Current&)
{
- StringObjectProxyDict::iterator p = _dict.find(name);
+ StringObjectProxyDict::iterator p = _dict.find(id);
if(p != _dict.end())
{
try
@@ -41,7 +41,7 @@ IcePack::AdapterRegistryI::add(const string& name, const AdapterPrx& adapter, co
if(_traceLevels->adapterRegistry > 0)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterRegistryCat);
- out << "added adapter `" << name << "'";
+ out << "added adapter `" << id << "'";
}
return;
@@ -51,19 +51,19 @@ IcePack::AdapterRegistryI::add(const string& name, const AdapterPrx& adapter, co
}
throw AdapterExistsException();
}
- _dict.insert(make_pair(name, adapter));
+ _dict.insert(make_pair(id, adapter));
if(_traceLevels->adapterRegistry > 0)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterRegistryCat);
- out << "added adapter `" << name << "'";
+ out << "added adapter `" << id << "'";
}
}
void
-IcePack::AdapterRegistryI::remove(const string& name, const Ice::Current&)
+IcePack::AdapterRegistryI::remove(const string& id, const Ice::Current&)
{
- StringObjectProxyDict::iterator p = _dict.find(name);
+ StringObjectProxyDict::iterator p = _dict.find(id);
if(p == _dict.end())
{
throw AdapterNotExistException();
@@ -74,14 +74,14 @@ IcePack::AdapterRegistryI::remove(const string& name, const Ice::Current&)
if(_traceLevels->adapterRegistry > 0)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterRegistryCat);
- out << "removed adapter `" << name << "'";
+ out << "removed adapter `" << id << "'";
}
}
AdapterPrx
-IcePack::AdapterRegistryI::findByName(const string& name, const Ice::Current&)
+IcePack::AdapterRegistryI::findById(const string& id, const Ice::Current&)
{
- StringObjectProxyDict::iterator p = _dict.find(name);
+ StringObjectProxyDict::iterator p = _dict.find(id);
if(p != _dict.end())
{
try
@@ -103,13 +103,13 @@ IcePack::AdapterRegistryI::findByName(const string& name, const Ice::Current&)
Ice::StringSeq
IcePack::AdapterRegistryI::getAll(const Ice::Current&) const
{
- Ice::StringSeq names;
- names.reserve(_dict.size());
+ Ice::StringSeq ids;
+ ids.reserve(_dict.size());
for(StringObjectProxyDict::const_iterator p = _dict.begin(); p != _dict.end(); ++p)
{
- names.push_back(p->first);
+ ids.push_back(p->first);
}
- return names;
+ return ids;
}
diff --git a/cpp/src/IcePack/AdapterRegistryI.h b/cpp/src/IcePack/AdapterRegistryI.h
index 7273868bb04..384d147ab9a 100644
--- a/cpp/src/IcePack/AdapterRegistryI.h
+++ b/cpp/src/IcePack/AdapterRegistryI.h
@@ -33,7 +33,7 @@ public:
virtual void add(const std::string&, const AdapterPrx&, const ::Ice::Current&);
virtual void remove(const std::string&, const ::Ice::Current&);
- virtual AdapterPrx findByName(const ::std::string&, const ::Ice::Current&);
+ virtual AdapterPrx findById(const ::std::string&, const ::Ice::Current&);
virtual Ice::StringSeq getAll(const ::Ice::Current&) const;
private:
diff --git a/cpp/src/IcePack/AdminI.cpp b/cpp/src/IcePack/AdminI.cpp
index 760e0d0f608..7d11d5bb6da 100644
--- a/cpp/src/IcePack/AdminI.cpp
+++ b/cpp/src/IcePack/AdminI.cpp
@@ -34,7 +34,7 @@ IcePack::AdminI::~AdminI()
}
void
-IcePack::AdminI::addApplication(const string& descriptor, const Targets& targets, const Current&)
+IcePack::AdminI::addApplication(const string& descriptor, const ServerTargets& targets, const Current&)
{
ApplicationBuilder builder(_communicator, _nodeRegistry, targets);
builder.parse(descriptor);
@@ -44,14 +44,14 @@ IcePack::AdminI::addApplication(const string& descriptor, const Targets& targets
void
IcePack::AdminI::removeApplication(const string& descriptor, const Current&)
{
- ApplicationBuilder builder(_communicator, _nodeRegistry, Targets());
+ ApplicationBuilder builder(_communicator, _nodeRegistry, ServerTargets());
builder.parse(descriptor);
builder.undo();
}
void
IcePack::AdminI::addServer(const string& node, const string& name, const string& path, const string& ldpath,
- const string& descriptor, const Targets& targets, const Current&)
+ const string& descriptor, const ServerTargets& targets, const Current&)
{
ApplicationBuilder builder(_communicator, _nodeRegistry, targets);
builder.addServer(name, node, descriptor, path, ldpath, "");
@@ -66,7 +66,7 @@ IcePack::AdminI::removeServer(const string& name, const Current&)
{
ServerDescription desc = server->getServerDescription();
- ApplicationBuilder builder(_communicator, _nodeRegistry, desc.theTargets);
+ ApplicationBuilder builder(_communicator, _nodeRegistry, desc.targets);
builder.addServer(name, desc.node, desc.descriptor, desc.path, "", "");
builder.undo();
}
@@ -209,9 +209,9 @@ IcePack::AdminI::setServerActivation(const ::std::string& name, ServerActivation
}
string
-IcePack::AdminI::getAdapterEndpoints(const string& name, const Current&) const
+IcePack::AdminI::getAdapterEndpoints(const string& id, const Current&) const
{
- AdapterPrx adapter = _adapterRegistry->findByName(name);
+ AdapterPrx adapter = _adapterRegistry->findById(id);
try
{
return _communicator->proxyToString(adapter->getDirectProxy(false));
@@ -227,7 +227,7 @@ IcePack::AdminI::getAdapterEndpoints(const string& name, const Current&) const
}
StringSeq
-IcePack::AdminI::getAllAdapterNames(const Current&) const
+IcePack::AdminI::getAllAdapterIds(const Current&) const
{
return _adapterRegistry->getAll();
}
diff --git a/cpp/src/IcePack/AdminI.h b/cpp/src/IcePack/AdminI.h
index c2f5bdc0521..614051633d1 100644
--- a/cpp/src/IcePack/AdminI.h
+++ b/cpp/src/IcePack/AdminI.h
@@ -27,11 +27,11 @@ public:
AdminI(const Ice::CommunicatorPtr&, const NodeRegistryPtr&, const ServerRegistryPtr&, const AdapterRegistryPtr&);
virtual ~AdminI();
- virtual void addApplication(const std::string&, const Targets&, const Ice::Current& = Ice::Current());
+ virtual void addApplication(const std::string&, const ServerTargets&, const Ice::Current& = Ice::Current());
virtual void removeApplication(const std::string&, const Ice::Current& = Ice::Current());
virtual void addServer(const std::string&, const std::string&, const std::string&, const std::string&,
- const std::string&, const Targets&, const Ice::Current& = Ice::Current());
+ const std::string&, const ServerTargets&, const Ice::Current& = Ice::Current());
virtual void removeServer(const ::std::string&, const Ice::Current&);
virtual ServerDescription getServerDescription(const ::std::string&, const Ice::Current&) const;
@@ -44,7 +44,7 @@ public:
virtual void setServerActivation(const ::std::string&, ServerActivation, const Ice::Current&);
virtual ::std::string getAdapterEndpoints(const ::std::string&, const ::Ice::Current&) const;
- virtual Ice::StringSeq getAllAdapterNames(const ::Ice::Current&) const;
+ virtual Ice::StringSeq getAllAdapterIds(const ::Ice::Current&) const;
virtual bool pingNode(const std::string&, const Ice::Current&) const;
virtual void shutdownNode(const std::string&, const Ice::Current&);
diff --git a/cpp/src/IcePack/ApplicationBuilder.cpp b/cpp/src/IcePack/ApplicationBuilder.cpp
index ea981a4b519..63f090d9af0 100644
--- a/cpp/src/IcePack/ApplicationBuilder.cpp
+++ b/cpp/src/IcePack/ApplicationBuilder.cpp
@@ -25,7 +25,7 @@ class AddServer : public Task
public:
AddServer(const ServerDeployerPrx& deployer, const string& node, const string& name, const string& descriptor,
- const string& binpath, const string& libpath, const Targets& targets) :
+ const string& binpath, const string& libpath, const ServerTargets& targets) :
_deployer(deployer),
_node(node),
_name(name),
@@ -95,7 +95,7 @@ private:
string _descriptor;
string _binpath;
string _libpath;
- Targets _targets;
+ ServerTargets _targets;
};
class ApplicationHandler : public ComponentHandler
diff --git a/cpp/src/IcePack/Internal.ice b/cpp/src/IcePack/Internal.ice
index ec377804119..8aa05a25b53 100644
--- a/cpp/src/IcePack/Internal.ice
+++ b/cpp/src/IcePack/Internal.ice
@@ -94,7 +94,7 @@ interface AdapterRegistry
* Add an adapter to the registry.
*
**/
- void add(string name, Adapter* adpt)
+ void add(string id, Adapter* adpt)
throws AdapterExistsException;
/**
@@ -102,24 +102,20 @@ interface AdapterRegistry
* Remove an adapter from the registry.
*
**/
- void remove(string name)
+ void remove(string id)
throws AdapterNotExistException;
/**
*
* Find an adapter and return its proxy.
*
- * @param name Name of the adapter.
- *
- * @return Adapter proxy.
- *
**/
- Adapter* findByName(string name)
+ Adapter* findById(string id)
throws AdapterNotExistException;
/**
*
- * Get all adapter names.
+ * Get all adapter ids.
*
**/
nonmutating Ice::StringSeq getAll();
@@ -157,14 +153,14 @@ class ServerAdapter implements Adapter
* The adapter server.
*
**/
- Server* theServer;
+ Server* svr;
/**
*
- * The adapter name.
+ * The adapter id.
*
**/
- string name;
+ string id;
};
/**
@@ -358,11 +354,11 @@ interface ServerDeployer
* @param libPath Specify the CLASSPATH value for Java servers,
* ignored for C++ servers.
*
- * @param tgts The optional targets to be executed during the
+ * @param targets The optional targets to be executed during the
* deployment.
*
**/
- void add(string name, string xmlfile, string binPath, string libPath, Targets tgts)
+ void add(string name, string xmlfile, string binPath, string libPath, ServerTargets targets)
throws DeploymentException;
/**
diff --git a/cpp/src/IcePack/LocatorI.cpp b/cpp/src/IcePack/LocatorI.cpp
index 68a8137dbf2..ab2822d7fbf 100644
--- a/cpp/src/IcePack/LocatorI.cpp
+++ b/cpp/src/IcePack/LocatorI.cpp
@@ -26,21 +26,21 @@ IcePack::LocatorI::LocatorI(const AdapterRegistryPtr& adapterRegistry,
}
Ice::ObjectPrx
-IcePack::LocatorI::findAdapterByName(const string& name, const Ice::Current&) const
+IcePack::LocatorI::findAdapterById(const string& id, const Ice::Current&) const
{
//
// TODO: I think will need to do something more sensible in cases
// where the adapter is found but the adapter proxy is null
// (possibly because the server activation failed or timed out) or
// if the adapter object isn't reachable (possibly because the
- // IcePack node is down or unreachable). Right now the Ice cleint
+ // IcePack node is down or unreachable). Right now the Ice client
// will always throw a NoEndpointException because we return a
// null proxy here...
//
try
{
- return _adapterRegistry->findByName(name)->getDirectProxy(true);
+ return _adapterRegistry->findById(id)->getDirectProxy(true);
}
catch(const AdapterNotExistException&)
{
@@ -55,7 +55,8 @@ IcePack::LocatorI::findAdapterByName(const string& name, const Ice::Current&) co
{
//
// This could be because we can't locate the IcePack node
- // adapter. IcePack server adapter proxy are not direct proxy.
+ // adapter (IcePack server adapter proxies are not direct
+ // proxies)
//
}
catch(const Ice::LocalException&)
diff --git a/cpp/src/IcePack/LocatorI.h b/cpp/src/IcePack/LocatorI.h
index e9e6b6e4d78..b35f2ff0f58 100644
--- a/cpp/src/IcePack/LocatorI.h
+++ b/cpp/src/IcePack/LocatorI.h
@@ -27,7 +27,7 @@ public:
LocatorI(const AdapterRegistryPtr&, const ::Ice::LocatorRegistryPrx&);
- virtual ::Ice::ObjectPrx findAdapterByName(const std::string&, const ::Ice::Current&) const;
+ virtual ::Ice::ObjectPrx findAdapterById(const std::string&, const ::Ice::Current&) const;
virtual ::Ice::LocatorRegistryPrx getRegistry(const ::Ice::Current&) const;
diff --git a/cpp/src/IcePack/LocatorRegistryI.cpp b/cpp/src/IcePack/LocatorRegistryI.cpp
index 170d8c777fb..c6e05275832 100644
--- a/cpp/src/IcePack/LocatorRegistryI.cpp
+++ b/cpp/src/IcePack/LocatorRegistryI.cpp
@@ -26,7 +26,7 @@ IcePack::LocatorRegistryI::LocatorRegistryI(const AdapterRegistryPtr& registry,
}
void
-IcePack::LocatorRegistryI::setAdapterDirectProxy(const string& name, const Ice::ObjectPrx& proxy, const Ice::Current&)
+IcePack::LocatorRegistryI::setAdapterDirectProxy(const string& id, const Ice::ObjectPrx& proxy, const Ice::Current&)
{
while(true)
{
@@ -35,7 +35,7 @@ IcePack::LocatorRegistryI::setAdapterDirectProxy(const string& name, const Ice::
//
// Get the adapter from the registry and set its direct proxy.
//
- _registry->findByName(name)->setDirectProxy(proxy);
+ _registry->findById(id)->setDirectProxy(proxy);
return;
}
catch(const AdapterNotExistException&)
@@ -87,7 +87,7 @@ IcePack::LocatorRegistryI::setAdapterDirectProxy(const string& name, const Ice::
AdapterPrx adapter = AdapterPrx::uncheckedCast(_adapter->addWithUUID(new StandaloneAdapterI()));
try
{
- _registry->add(name, adapter);
+ _registry->add(id, adapter);
}
catch(const AdapterExistsException&)
{
diff --git a/cpp/src/IcePack/NodeRegistryI.cpp b/cpp/src/IcePack/NodeRegistryI.cpp
index 83388320d1b..19527736a76 100644
--- a/cpp/src/IcePack/NodeRegistryI.cpp
+++ b/cpp/src/IcePack/NodeRegistryI.cpp
@@ -85,7 +85,7 @@ IcePack::NodeRegistryI::add(const string& name, const NodePrx& node, const Ice::
try
{
- _adapterRegistry->findByName("IcePack.Node-" + name);
+ _adapterRegistry->findById("IcePack.Node-" + name);
//
// TODO: ensure this adapter has been created by the adapter
@@ -137,7 +137,7 @@ IcePack::NodeRegistryI::remove(const string& name, const Ice::Current&)
//
try
{
- AdapterPrx adapter = _adapterRegistry->findByName("IcePack.Node-" + name);
+ AdapterPrx adapter = _adapterRegistry->findById("IcePack.Node-" + name);
adapter->destroy();
_adapterRegistry->remove("IcePack.Node-" + name);
}
diff --git a/cpp/src/IcePack/Parser.cpp b/cpp/src/IcePack/Parser.cpp
index 79c8e5d1a02..c4d86b3d81e 100644
--- a/cpp/src/IcePack/Parser.cpp
+++ b/cpp/src/IcePack/Parser.cpp
@@ -90,7 +90,7 @@ IcePack::Parser::addApplication(const list<string>& args)
string descriptor = *p++;
- Targets targets;
+ ServerTargets targets;
for(; p != args.end(); ++p)
{
targets.push_back(*p);
@@ -231,7 +231,7 @@ IcePack::Parser::addServer(const list<string>& args)
string descriptor = *p++;
string path;
string ldpath;
- Targets targets;
+ ServerTargets targets;
if(p != args.end())
{
@@ -349,7 +349,7 @@ IcePack::Parser::describeServer(const list<string>& args)
cout << "pwd = " << desc.pwd << endl;
cout << "activation = " << (activation == OnDemand ? "on-demand" : "manual") << endl;
cout << "args = ";
- copy(desc.theArgs.begin(), desc.theArgs.end(), ostream_iterator<string>(cout," "));
+ copy(desc.args.begin(), desc.args.end(), ostream_iterator<string>(cout," "));
cout << endl;
}
catch(const Exception& ex)
@@ -513,7 +513,7 @@ IcePack::Parser::listAllAdapters()
{
try
{
- Ice::StringSeq names = _admin->getAllAdapterNames();
+ Ice::StringSeq names = _admin->getAllAdapterIds();
copy(names.begin(), names.end(), ostream_iterator<string>(cout,"\n"));
}
catch(const Exception& ex)
diff --git a/cpp/src/IcePack/ServerAdapterI.cpp b/cpp/src/IcePack/ServerAdapterI.cpp
index d6a06dbc096..03765094e3b 100644
--- a/cpp/src/IcePack/ServerAdapterI.cpp
+++ b/cpp/src/IcePack/ServerAdapterI.cpp
@@ -47,12 +47,12 @@ IcePack::ServerAdapterI::getDirectProxy(bool activate, const Ice::Current& curre
if(_traceLevels->adapter > 2)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat);
- out << "waiting for activation of server adapter `" << name << "'";
+ out << "waiting for activation of server adapter `" << id << "'";
}
try
{
- if(theServer->start(OnDemand))
+ if(svr->start(OnDemand))
{
_notified = false;
@@ -64,7 +64,7 @@ IcePack::ServerAdapterI::getDirectProxy(bool activate, const Ice::Current& curre
if(_traceLevels->adapter > 1)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat);
- out << "server adapter `" << name << "' activation timed out";
+ out << "server adapter `" << id << "' activation timed out";
}
}
}
@@ -74,7 +74,7 @@ IcePack::ServerAdapterI::getDirectProxy(bool activate, const Ice::Current& curre
if(_traceLevels->adapter > 1)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat);
- out << "server adapter `" << name << "' activation failed, couldn't start the server";
+ out << "server adapter `" << id << "' activation failed, couldn't start the server";
}
}
}
@@ -105,7 +105,7 @@ IcePack::ServerAdapterI::setDirectProxy(const Ice::ObjectPrx& prx, const Ice::Cu
//
if(prx && _proxy)
{
- if(theServer->getState() == Active)
+ if(svr->getState() == Active)
{
throw AdapterActiveException();
}
@@ -117,7 +117,7 @@ IcePack::ServerAdapterI::setDirectProxy(const Ice::ObjectPrx& prx, const Ice::Cu
if(_traceLevels->adapter > 1)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat);
- out << "server adapter `" << name << "' " << (_proxy ? "activated" : "deactivated");
+ out << "server adapter `" << id << "' " << (_proxy ? "activated" : "deactivated");
}
notifyAll();
diff --git a/cpp/src/IcePack/ServerBuilder.cpp b/cpp/src/IcePack/ServerBuilder.cpp
index a7d08449325..79697a883f0 100644
--- a/cpp/src/IcePack/ServerBuilder.cpp
+++ b/cpp/src/IcePack/ServerBuilder.cpp
@@ -111,9 +111,9 @@ class RegisterServerAdapterTask : public Task
{
public:
- RegisterServerAdapterTask(const AdapterRegistryPrx& registry, const string& name, const ServerBuilder& builder) :
+ RegisterServerAdapterTask(const AdapterRegistryPrx& registry, const string& id, const ServerBuilder& builder) :
_registry(registry),
- _name(name),
+ _id(id),
_builder(builder)
{
}
@@ -123,7 +123,7 @@ public:
{
try
{
- _registry->add(_name, _builder.getServerAdapter(_name));
+ _registry->add(_id, _builder.getServerAdapter(_id));
}
catch(const AdapterExistsException& lex)
{
@@ -131,7 +131,7 @@ public:
os << "couldn't add the adapter to the registry:\n" << lex;
AdapterDeploymentException ex;
- ex.adapter = _name;
+ ex.id = _id;
ex.reason = os.str();
throw ex;
}
@@ -141,7 +141,7 @@ public:
os << "couldn't contact the adapter registry: " << lex << endl;
AdapterDeploymentException ex;
- ex.adapter = _name;
+ ex.id = _id;
ex.reason = os.str();
throw ex;
}
@@ -152,7 +152,7 @@ public:
{
try
{
- _registry->remove(_name);
+ _registry->remove(_id);
}
catch(const AdapterNotExistException& lex)
{
@@ -160,7 +160,7 @@ public:
os << "couldn't remove the adapter from the registry:\n" << lex;
AdapterDeploymentException ex;
- ex.adapter = _name;
+ ex.id = _id;
ex.reason = os.str();
throw ex;
}
@@ -170,7 +170,7 @@ public:
os << "couldn't contact the adapter registry:\n" << lex;
AdapterDeploymentException ex;
- ex.adapter = _name;
+ ex.id = _id;
ex.reason = os.str();
throw ex;
}
@@ -179,7 +179,7 @@ public:
private:
AdapterRegistryPrx _registry;
- string _name;
+ string _id;
const ServerBuilder& _builder;
};
@@ -341,7 +341,7 @@ IcePack::ServerBuilder::ServerBuilder(const NodeInfoPtr& nodeInfo,
_description.path = _variables["binpath"];
_libraryPath = _variables["libpath"];
_description.node = nodeInfo->getNode()->getName();
- _description.theTargets = targets;
+ _description.targets = targets;
}
void
@@ -381,11 +381,11 @@ IcePack::ServerBuilder::parse(const std::string& descriptor)
for(vector<string>::reverse_iterator p = _javaOptions.rbegin(); p != _javaOptions.rend(); ++p)
{
- _description.theArgs.insert(_description.theArgs.begin(), *p);
+ _description.args.insert(_description.args.begin(), *p);
}
}
- _description.theArgs.push_back("--Ice.Config=" + _configFile);
+ _description.args.push_back("--Ice.Config=" + _configFile);
}
void
@@ -393,13 +393,13 @@ IcePack::ServerBuilder::execute()
{
//
// Creates the server from _description and the server adapters
- // listed in _serverAdapterNames. The adapter proxies are returned
+ // listed in _serverAdapterIds. The adapter proxies are returned
// in _serverAdapters.
//
try
{
_server = _nodeInfo->getServerFactory()->createServerAndAdapters(_description,
- _serverAdapterNames,
+ _serverAdapterIds,
_serverAdapters);
}
catch(const Freeze::DBException& lex)
@@ -555,7 +555,7 @@ IcePack::ServerBuilder::registerAdapter(const string& name, const string& endpoi
// method). The RegisterServerAdapter task will get the server
// adapter proxy through the builder method getServerAdapter().
//
- _serverAdapterNames.push_back(adapterId);
+ _serverAdapterIds.push_back(adapterId);
_tasks.push_back(new RegisterServerAdapterTask(adapterRegistry, adapterId, *this));
//
@@ -609,7 +609,7 @@ IcePack::ServerBuilder::addService(const string& name, const string& descriptor,
void
IcePack::ServerBuilder::addOption(const string& option)
{
- _description.theArgs.push_back(option);
+ _description.args.push_back(option);
}
void
@@ -680,9 +680,9 @@ IcePack::ServerBuilder::getServer() const
}
ServerAdapterPrx
-IcePack::ServerBuilder::getServerAdapter(const std::string& name) const
+IcePack::ServerBuilder::getServerAdapter(const std::string& id) const
{
- map<string, ServerAdapterPrx>::const_iterator p = _serverAdapters.find(name);
+ map<string, ServerAdapterPrx>::const_iterator p = _serverAdapters.find(id);
if(p != _serverAdapters.end())
{
return p->second;
diff --git a/cpp/src/IcePack/ServerBuilder.h b/cpp/src/IcePack/ServerBuilder.h
index 753706f9b60..94041083285 100644
--- a/cpp/src/IcePack/ServerBuilder.h
+++ b/cpp/src/IcePack/ServerBuilder.h
@@ -60,7 +60,7 @@ private:
NodeInfoPtr _nodeInfo;
ServerDescription _description;
- std::vector<std::string> _serverAdapterNames;
+ std::vector<std::string> _serverAdapterIds;
ServerKind _kind;
std::string _className;
std::string _libraryPath;
diff --git a/cpp/src/IcePack/ServerDeployerI.cpp b/cpp/src/IcePack/ServerDeployerI.cpp
index a0bb10105f9..8ee4785fee2 100644
--- a/cpp/src/IcePack/ServerDeployerI.cpp
+++ b/cpp/src/IcePack/ServerDeployerI.cpp
@@ -32,7 +32,7 @@ IcePack::ServerDeployerI::~ServerDeployerI()
void
IcePack::ServerDeployerI::add(const string& name, const string& descriptor, const string& binPath,
- const string& libPath, const Targets& targets, const Ice::Current&)
+ const string& libPath, const ServerTargets& targets, const Ice::Current&)
{
//
// Setup required variables.
@@ -122,7 +122,7 @@ IcePack::ServerDeployerI::remove(const string& name, const Ice::Current&)
string dataDir = _nodeInfo->getCommunicator()->getProperties()->getProperty("IcePack.Node.Data");
variables["datadir"] = dataDir + (dataDir[dataDir.length() - 1] == '/' ? "" : "/") + "servers/" + name;
- ServerBuilder builder(_nodeInfo, variables, desc.theTargets);
+ ServerBuilder builder(_nodeInfo, variables, desc.targets);
//
// Parse the server deployment descriptors.
diff --git a/cpp/src/IcePack/ServerDeployerI.h b/cpp/src/IcePack/ServerDeployerI.h
index 2f5491ca25f..2a0eb5554b2 100644
--- a/cpp/src/IcePack/ServerDeployerI.h
+++ b/cpp/src/IcePack/ServerDeployerI.h
@@ -30,7 +30,7 @@ public:
virtual ~ServerDeployerI();
virtual void add(const ::std::string&, const ::std::string&, const ::std::string&, const ::std::string&,
- const ::IcePack::Targets&, const ::Ice::Current& = ::Ice::Current());
+ const ::IcePack::ServerTargets&, const ::Ice::Current& = ::Ice::Current());
virtual void remove(const ::std::string&, const ::Ice::Current& = ::Ice::Current());
diff --git a/cpp/src/IcePack/ServerFactory.cpp b/cpp/src/IcePack/ServerFactory.cpp
index 8a849be97f3..20858d3c3ae 100644
--- a/cpp/src/IcePack/ServerFactory.cpp
+++ b/cpp/src/IcePack/ServerFactory.cpp
@@ -137,7 +137,7 @@ IcePack::ServerFactory::destroy()
//
ServerPrx
IcePack::ServerFactory::createServerAndAdapters(const ServerDescription& description,
- const vector<string>& adapterNames,
+ const vector<string>& adapterIds,
map<string, ServerAdapterPrx>& adapters)
{
//
@@ -155,7 +155,7 @@ IcePack::ServerFactory::createServerAndAdapters(const ServerDescription& descrip
// Create the server adapters.
//
ServerPrx proxy = ServerPrx::uncheckedCast(_adapter->createProxy(id));
- for(Ice::StringSeq::const_iterator p = adapterNames.begin(); p != adapterNames.end(); ++p)
+ for(Ice::StringSeq::const_iterator p = adapterIds.begin(); p != adapterIds.end(); ++p)
{
ServerAdapterPrx adapterProxy = createServerAdapter(*p, proxy);
adapters[*p] = adapterProxy;
@@ -185,15 +185,15 @@ IcePack::ServerFactory::createServerAndAdapters(const ServerDescription& descrip
// and add it the evictor database.
//
ServerAdapterPrx
-IcePack::ServerFactory::createServerAdapter(const string& name, const ServerPrx& server)
+IcePack::ServerFactory::createServerAdapter(const string& adapterId, const ServerPrx& server)
{
ServerAdapterPtr adapterI = new ServerAdapterI(this, _traceLevels, _waitTime);
- adapterI->name = name;
- adapterI->theServer = server;
+ adapterI->id = adapterId;
+ adapterI->svr = server;
Ice::Identity id;
id.category = "IcePackServerAdapter";
- id.name = name + "-" + IceUtil::generateUUID();
+ id.name = adapterId + "-" + IceUtil::generateUUID();
_adapter->add(adapterI, id);
@@ -202,7 +202,7 @@ IcePack::ServerFactory::createServerAdapter(const string& name, const ServerPrx&
if(_traceLevels->adapter > 0)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat);
- out << "created server adapter `" << name << "'";
+ out << "created server adapter `" << adapterId << "'";
}
return ServerAdapterPrx::uncheckedCast(_adapter->createProxy(id));
@@ -245,13 +245,13 @@ IcePack::ServerFactory::destroy(const ServerAdapterPtr& adapter, const Ice::Iden
if(_traceLevels->adapter > 0)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->adapterCat);
- out << "destroyed server adapter `" << adapter->name << "'";
+ out << "destroyed server adapter `" << adapter->id << "'";
}
}
catch(const Freeze::DBException& ex)
{
ostringstream os;
- os << "couldn't destroy server adapter `" << adapter->name << "':\n" << ex;
+ os << "couldn't destroy server adapter `" << adapter->id << "':\n" << ex;
_traceLevels->logger->warning(os.str());
}
catch(const Freeze::EvictorDeactivatedException&)