summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2002-04-22 15:32:23 +0000
committerMatthew Newhook <matthew@zeroc.com>2002-04-22 15:32:23 +0000
commit30fec93a8099173baf8180fc5d7736c55cff8a5b (patch)
tree977447ff0a22c8f0710a19e26aa2f27180479b10 /cpp
parentfix (diff)
downloadice-30fec93a8099173baf8180fc5d7736c55cff8a5b.tar.bz2
ice-30fec93a8099173baf8180fc5d7736c55cff8a5b.tar.xz
ice-30fec93a8099173baf8180fc5d7736c55cff8a5b.zip
Various Glacier changes.
Diffstat (limited to 'cpp')
-rw-r--r--cpp/demo/Glacier/session/.depend4
-rw-r--r--cpp/demo/Glacier/session/Client.cpp239
-rw-r--r--cpp/demo/Glacier/session/HelloSession.ice21
-rw-r--r--cpp/demo/Glacier/session/HelloSessionI.cpp55
-rw-r--r--cpp/demo/Glacier/session/HelloSessionI.h48
-rw-r--r--cpp/demo/Glacier/session/Makefile49
-rw-r--r--cpp/demo/Glacier/session/Server.cpp91
-rw-r--r--cpp/demo/Glacier/session/config70
-rw-r--r--cpp/demo/Glacier/session/sessionC.dsp157
-rw-r--r--cpp/demo/Glacier/session/sessionS.dsp165
-rw-r--r--cpp/demo/Ice/callback/config10
-rw-r--r--cpp/demo/Ice/hello/config6
-rw-r--r--cpp/demo/Ice/latency/config2
-rw-r--r--cpp/demo/Ice/nested/config10
-rw-r--r--cpp/demo/Ice/value/config6
-rw-r--r--cpp/doc/Properties.sgml94
-rw-r--r--cpp/include/Glacier/Glacier.h18
-rw-r--r--cpp/slice/Glacier/Router.ice61
-rw-r--r--cpp/slice/Glacier/Session.ice38
-rw-r--r--cpp/slice/Glacier/SessionF.ice21
-rw-r--r--cpp/slice/Glacier/SessionManager.ice45
-rw-r--r--cpp/slice/Glacier/SessionManagerF.ice21
-rw-r--r--cpp/slice/Glacier/Starter.ice (renamed from cpp/slice/Glacier/Glacier.ice)13
-rw-r--r--cpp/slice/Ice/Router.ice15
-rw-r--r--cpp/src/Glacier/.depend13
-rw-r--r--cpp/src/Glacier/ClientBlobject.cpp40
-rw-r--r--cpp/src/Glacier/ClientBlobject.h6
-rw-r--r--cpp/src/Glacier/GlacierRouter.cpp36
-rw-r--r--cpp/src/Glacier/GlacierStarter.cpp28
-rw-r--r--cpp/src/Glacier/Makefile63
-rw-r--r--cpp/src/Glacier/RouterI.cpp36
-rw-r--r--cpp/src/Glacier/RouterI.h18
-rw-r--r--cpp/src/Glacier/ServerBlobject.cpp2
-rw-r--r--cpp/src/Glacier/StarterI.cpp (renamed from cpp/src/Glacier/GlacierI.cpp)16
-rw-r--r--cpp/src/Glacier/StarterI.h (renamed from cpp/src/Glacier/GlacierI.h)14
35 files changed, 1408 insertions, 123 deletions
diff --git a/cpp/demo/Glacier/session/.depend b/cpp/demo/Glacier/session/.depend
new file mode 100644
index 00000000000..c926bafcdad
--- /dev/null
+++ b/cpp/demo/Glacier/session/.depend
@@ -0,0 +1,4 @@
+HelloSession.o: HelloSession.cpp HelloSession.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Identity.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/Ice/BasicStream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Glacier/Session.h ../../../include/Ice/LocalException.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/Stream.h ../../../include/Ice/BuiltinSequences.h
+Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Identity.h ../../../include/Ice/Properties.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/LoggerF.h ../../../include/Ice/Communicator.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/SystemF.h ../../../include/Ice/SslExtensionF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h ../../../include/Glacier/Glacier.h ../../../include/Glacier/Starter.h ../../../include/Glacier/Router.h ../../../include/Ice/Router.h ../../../include/Glacier/SessionF.h ../../../include/Glacier/Session.h ../../../include/Glacier/SessionManager.h HelloSession.h
+HelloSessionI.o: HelloSessionI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Identity.h ../../../include/Ice/Properties.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/LoggerF.h ../../../include/Ice/Communicator.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/SystemF.h ../../../include/Ice/SslExtensionF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h HelloSessionI.h ../../../include/Glacier/SessionManager.h ../../../include/Glacier/SessionF.h HelloSession.h ../../../include/Glacier/Session.h
+Server.o: Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/StreamF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Identity.h ../../../include/Ice/Properties.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/LoggerF.h ../../../include/Ice/Communicator.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/EndpointF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Current.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/SystemF.h ../../../include/Ice/SslExtensionF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h ../../../include/Glacier/Glacier.h ../../../include/Glacier/Starter.h ../../../include/Glacier/Router.h ../../../include/Ice/Router.h ../../../include/Glacier/SessionF.h ../../../include/Glacier/Session.h ../../../include/Glacier/SessionManager.h HelloSessionI.h HelloSession.h
diff --git a/cpp/demo/Glacier/session/Client.cpp b/cpp/demo/Glacier/session/Client.cpp
new file mode 100644
index 00000000000..660f247201f
--- /dev/null
+++ b/cpp/demo/Glacier/session/Client.cpp
@@ -0,0 +1,239 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <Glacier/Glacier.h>
+#include <Glacier/Router.h>
+
+#include <HelloSession.h>
+
+using namespace std;
+
+void
+menu()
+{
+ cout <<
+ "usage:\n"
+ "t: send greeting as twoway\n"
+ "o: send greeting as oneway\n"
+ "O: send greeting as batch oneway\n"
+ "d: send greeting as datagram\n"
+ "D: send greeting as batch datagram\n"
+ "f: flush all batch requests\n"
+ "T: set a timeout\n"
+ "S: switch secure mode on/off\n"
+ "x: exit\n"
+ "?: help\n";
+}
+
+int
+run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
+{
+ Ice::PropertiesPtr properties = communicator->getProperties();
+ //
+ // Do Glacier setup.
+ //
+ const char* glacierStarterEndpointsProperty = "Glacier.Starter.Endpoints";
+ string glacierStarterEndpoints = properties->getProperty(glacierStarterEndpointsProperty);
+ assert (!glacierStarterEndpoints.empty());
+ Ice::ObjectPrx starterBase = communicator->stringToProxy("Glacier/starter:" + glacierStarterEndpoints);
+ Glacier::StarterPrx starter = Glacier::StarterPrx::checkedCast(starterBase);
+ if (!starter)
+ {
+ cerr << argv[0] << ": endpoints `" << glacierStarterEndpoints
+ << "' do not refer to a glacier router starter" << endl;
+ return EXIT_FAILURE;
+ }
+
+ Ice::ByteSeq privateKey;
+ Ice::ByteSeq publicKey;
+ Ice::ByteSeq routerCert;
+
+ Glacier::RouterPrx router;
+ string id;
+ string pw;
+
+ while (true)
+ {
+ cout << "user id: " << flush;
+ cin >> id;
+ cout << "password: " << flush;
+ cin >> pw;
+
+ try
+ {
+ router = starter->startRouter(id, pw, privateKey, publicKey, routerCert);
+ }
+ catch (const Glacier::CannotStartRouterException& ex)
+ {
+ cerr << argv[0] << ": " << ex << ":\n" << ex.reason << endl;
+ return EXIT_FAILURE;
+ }
+ catch (const Glacier::InvalidPasswordException&)
+ {
+ cout << "password is invalid, try again" << endl;
+ continue;
+ }
+ break;
+ }
+
+ communicator->setDefaultRouter(router);
+
+ Glacier::SessionPrx session = router->createSession();
+ HelloSessionPrx base = HelloSessionPrx::checkedCast(session);
+
+ HelloSessionPrx twoway = HelloSessionPrx::checkedCast(base->ice_twoway()->ice_timeout(-1)->ice_secure(false));
+ if (!twoway)
+ {
+ cerr << argv[0] << ": invalid object reference" << endl;
+ return EXIT_FAILURE;
+ }
+ HelloSessionPrx oneway = HelloSessionPrx::uncheckedCast(twoway->ice_oneway());
+ HelloSessionPrx batchOneway = HelloSessionPrx::uncheckedCast(twoway->ice_batchOneway());
+ HelloSessionPrx datagram = HelloSessionPrx::uncheckedCast(twoway->ice_datagram());
+ HelloSessionPrx batchDatagram = HelloSessionPrx::uncheckedCast(twoway->ice_batchDatagram());
+
+ bool secure = false;
+ int timeout = -1;
+
+ menu();
+
+ char c;
+ do
+ {
+ try
+ {
+ cout << "==> ";
+ cin >> c;
+ if (c == 't')
+ {
+ twoway->hello();
+ }
+ else if (c == 'o')
+ {
+ oneway->hello();
+ }
+ else if (c == 'O')
+ {
+ batchOneway->hello();
+ }
+ else if (c == 'd')
+ {
+ datagram->hello();
+ }
+ else if (c == 'D')
+ {
+ batchDatagram->hello();
+ }
+ else if (c == 'f')
+ {
+ batchOneway->ice_flush();
+ batchDatagram->ice_flush();
+ }
+ else if (c == 'T')
+ {
+ if (timeout == -1)
+ {
+ timeout = 2000;
+ }
+ else
+ {
+ timeout = -1;
+ }
+
+ twoway = HelloSessionPrx::uncheckedCast(twoway->ice_timeout(timeout));
+ oneway = HelloSessionPrx::uncheckedCast(oneway->ice_timeout(timeout));
+ batchOneway = HelloSessionPrx::uncheckedCast(batchOneway->ice_timeout(timeout));
+
+ if (timeout == -1)
+ {
+ cout << "timeout is now switched off" << endl;
+ }
+ else
+ {
+ cout << "timeout is now set to 2000ms" << endl;
+ }
+ }
+ else if (c == 'S')
+ {
+ secure = !secure;
+
+ twoway = HelloSessionPrx::uncheckedCast(twoway->ice_secure(secure));
+ oneway = HelloSessionPrx::uncheckedCast(oneway->ice_secure(secure));
+ batchOneway = HelloSessionPrx::uncheckedCast(batchOneway->ice_secure(secure));
+ datagram = HelloSessionPrx::uncheckedCast(datagram->ice_secure(secure));
+ batchDatagram = HelloSessionPrx::uncheckedCast(batchDatagram->ice_secure(secure));
+
+ if (secure)
+ {
+ cout << "secure mode is now on" << endl;
+ }
+ else
+ {
+ cout << "secure mode is now off" << endl;
+ }
+ }
+ else if (c == 'x')
+ {
+ // Nothing to do
+ }
+ else if (c == '?')
+ {
+ menu();
+ }
+ else
+ {
+ cout << "unknown command `" << c << "'" << endl;
+ menu();
+ }
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ }
+ }
+ while (cin.good() && c != 'x');
+
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ Ice::PropertiesPtr properties = Ice::createPropertiesFromFile(argc, argv, "config");
+ communicator = Ice::initializeWithProperties(properties);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/demo/Glacier/session/HelloSession.ice b/cpp/demo/Glacier/session/HelloSession.ice
new file mode 100644
index 00000000000..a4c8f162bc8
--- /dev/null
+++ b/cpp/demo/Glacier/session/HelloSession.ice
@@ -0,0 +1,21 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef HELLO_ICE
+#define HELLO_ICE
+
+#include <Glacier/Session.ice>
+
+class HelloSession implements Glacier::Session
+{
+ void hello();
+};
+
+#endif
diff --git a/cpp/demo/Glacier/session/HelloSessionI.cpp b/cpp/demo/Glacier/session/HelloSessionI.cpp
new file mode 100644
index 00000000000..30f1e4111f7
--- /dev/null
+++ b/cpp/demo/Glacier/session/HelloSessionI.cpp
@@ -0,0 +1,55 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <HelloSessionI.h>
+
+using namespace std;
+
+HelloSessionManagerI::HelloSessionManagerI(const Ice::ObjectAdapterPtr& adapter) :
+ _adapter(adapter)
+{
+}
+
+Glacier::SessionPrx
+HelloSessionManagerI::create(const string& userId, const Ice::Current&)
+{
+ Glacier::SessionPtr session = new HelloSessionI(userId, this);
+ Ice::Identity ident;
+ ident.category = userId;
+ ident.name = "session";
+
+ _adapter->add(session, ident);
+ return Glacier::SessionPrx::uncheckedCast(_adapter->createProxy(ident));
+}
+
+void
+HelloSessionManagerI::remove(const Ice::Identity& ident)
+{
+ _adapter->remove(ident);
+}
+
+HelloSessionI::HelloSessionI(const string& userId, const HelloSessionManagerIPtr& manager) :
+ _userId(userId),
+ _manager(manager)
+{
+}
+
+void
+HelloSessionI::hello(const Ice::Current&)
+{
+ cout << "Hello " << _userId << endl;
+}
+
+void
+HelloSessionI::stop(const Ice::Current& current)
+{
+ _manager->remove(current.identity);
+}
diff --git a/cpp/demo/Glacier/session/HelloSessionI.h b/cpp/demo/Glacier/session/HelloSessionI.h
new file mode 100644
index 00000000000..b7270fd7e76
--- /dev/null
+++ b/cpp/demo/Glacier/session/HelloSessionI.h
@@ -0,0 +1,48 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef HELLO_SESSION_I_H
+#define HELLO_SESSION_I_H
+
+#include <Glacier/SessionManager.h>
+#include <HelloSession.h>
+
+class HelloSessionManagerI : public Glacier::SessionManager
+{
+public:
+
+ HelloSessionManagerI(const Ice::ObjectAdapterPtr&);
+
+ virtual Glacier::SessionPrx create(const ::std::string&, const Ice::Current&);
+
+ void remove(const Ice::Identity&);
+
+private:
+
+ Ice::ObjectAdapterPtr _adapter;
+};
+typedef IceUtil::Handle<HelloSessionManagerI> HelloSessionManagerIPtr;
+
+class HelloSessionI : public HelloSession
+{
+public:
+
+ HelloSessionI(const ::std::string&, const HelloSessionManagerIPtr&);
+
+ virtual void stop(const Ice::Current&);
+ virtual void hello(const Ice::Current&);
+
+private:
+
+ ::std::string _userId;
+ HelloSessionManagerIPtr _manager;
+};
+
+#endif
diff --git a/cpp/demo/Glacier/session/Makefile b/cpp/demo/Glacier/session/Makefile
new file mode 100644
index 00000000000..7aa21b99c61
--- /dev/null
+++ b/cpp/demo/Glacier/session/Makefile
@@ -0,0 +1,49 @@
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+CLIENT = client
+SERVER = server
+
+TARGETS = $(CLIENT) $(SERVER)
+
+OBJS = HelloSession.o
+
+COBJS = Client.o
+
+SOBJS = HelloSessionI.o \
+ Server.o
+
+SRCS = $(OBJS:.o=.cpp) \
+ $(COBJS:.o=.cpp) \
+ $(SOBJS:.o=.cpp)
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. $(CPPFLAGS)
+SLICECMD = $(SLICE2CPP) -I$(slicedir)
+
+$(CLIENT): $(OBJS) $(COBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) -lGlacier $(LIBS)
+
+$(SERVER): $(OBJS) $(SOBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) -lGlacier $(LIBS)
+
+HelloSession.h HelloSession.cpp: HelloSession.ice $(SLICE2CPP)
+ rm -f HelloSession.h HelloSession.cpp
+ $(SLICECMD) HelloSession.ice
+
+clean::
+ rm -f HelloSession.h HelloSession.cpp
+
+include .depend
diff --git a/cpp/demo/Glacier/session/Server.cpp b/cpp/demo/Glacier/session/Server.cpp
new file mode 100644
index 00000000000..227d75e378b
--- /dev/null
+++ b/cpp/demo/Glacier/session/Server.cpp
@@ -0,0 +1,91 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <Glacier/Glacier.h>
+#include <HelloSessionI.h>
+
+using namespace std;
+
+class PasswordVerifierI : public Glacier::PasswordVerifier
+{
+public:
+
+ PasswordVerifierI(const Ice::ObjectAdapterPtr& adapter) :
+ _adapter(adapter)
+ {
+ }
+
+ virtual bool
+ checkPassword(const string& userId, const string& password, const Ice::Current&)
+ {
+ return userId == password;
+ }
+
+private:
+
+ Ice::ObjectAdapterPtr _adapter;
+};
+
+int
+run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
+{
+ Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("HelloSessionManagerAdapter");
+
+ //
+ // Create the SessionManager.
+ //
+ Ice::ObjectPtr object = new HelloSessionManagerI(adapter);
+ adapter->add(object, Ice::stringToIdentity("HelloSessionManager"));
+
+ //
+ // Create the PasswordVerifier.
+ //
+ Ice::ObjectPtr passwdVerifier = new PasswordVerifierI(adapter);
+ adapter->add(passwdVerifier, Ice::stringToIdentity("PasswordVerifier"));
+
+ adapter->activate();
+ communicator->waitForShutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ Ice::PropertiesPtr properties = Ice::createPropertiesFromFile(argc, argv, "config");
+ communicator = Ice::initializeWithProperties(properties);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/demo/Glacier/session/config b/cpp/demo/Glacier/session/config
new file mode 100644
index 00000000000..7e4376cbe16
--- /dev/null
+++ b/cpp/demo/Glacier/session/config
@@ -0,0 +1,70 @@
+#
+# The server creates one single object adapter with the name
+# "helloadapater". The following line sets the endpoints for this
+# adapter
+#
+Ice.Adapter.HelloSessionManagerAdapter.Endpoints=tcp -p 10000:udp -p 10000:ssl -p 10001
+
+#
+# Warn about connection exceptions
+#
+Ice.ConnectionWarnings=1
+
+#
+# Network Tracing
+#
+# 0 = no network tracing
+# 1 = trace connection establishment and closure
+# 2 = like 1, but more detailed
+# 3 = like 2, but also trace data transfer
+#
+Ice.Trace.Network=1
+
+#
+# Protocol Tracing
+#
+# 0 = no protocol tracing
+# 1 = trace protocol messages
+#
+#Ice.Trace.Protocol=1
+
+#
+# Security Tracing
+#
+# 0 = no security tracing
+# 1 = trace warning messages
+# 2 = config file parsing warnings
+#
+#Ice.Trace.Security=4
+
+#
+# SSL Configuration File
+#
+# An XML based file that specifies the certificates, keys, SSL version
+# and other pertinent information for creating an SSL connection.
+#
+Ice.SSL.Client.CertPath=../../../certs
+Ice.SSL.Client.Config=sslconfig.xml
+Ice.SSL.Server.CertPath=../../../certs
+Ice.SSL.Server.Config=sslconfig.xml
+
+#
+# Glacier Router settings
+#
+Glacier.Router.Endpoints=default
+Glacier.Router.SessionManager=HelloSessionManager:tcp -p 10000:ssl -p 10001
+Glacier.Router.Client.Endpoints=tcp:udp:ssl
+Glacier.Router.Trace.Client=2
+Glacier.Router.Trace.RoutingTable=1
+
+#
+# Glacier Starter settings
+#
+Glacier.Starter.PasswordVerifier=PasswordVerifier:tcp -p 10000:ssl -p 10001
+Glacier.Starter.AddUserToAllowCategories=true
+Glacier.Starter.Endpoints=tcp -p 11000:ssl -p 11001
+
+#
+# Uncomment the following lines if you want to run this demo with Glacier
+#
+#Ice.DefaultRouter=Glacier/router:default -p 10005
diff --git a/cpp/demo/Glacier/session/sessionC.dsp b/cpp/demo/Glacier/session/sessionC.dsp
new file mode 100644
index 00000000000..6f7109856ae
--- /dev/null
+++ b/cpp/demo/Glacier/session/sessionC.dsp
@@ -0,0 +1,157 @@
+# Microsoft Developer Studio Project File - Name="sessionC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=sessionC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "sessionC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "sessionC.mak" CFG="sessionC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "sessionC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "sessionC - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "sessionC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
+# SUBTRACT LINK32 /debug /nodefaultlib
+
+!ELSEIF "$(CFG)" == "sessionC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /GZ /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF
+
+# Begin Target
+
+# Name "sessionC - Win32 Release"
+# Name "sessionC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Hello.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Hello.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Hello.ice
+
+!IF "$(CFG)" == "sessionC - Win32 Release"
+
+USERDEP__HELLO="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Hello.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Hello.ice \
+
+
+"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Hello.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "sessionC - Win32 Debug"
+
+USERDEP__HELLO="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Hello.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Hello.ice \
+
+
+"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Hello.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/demo/Glacier/session/sessionS.dsp b/cpp/demo/Glacier/session/sessionS.dsp
new file mode 100644
index 00000000000..f978d5af5ab
--- /dev/null
+++ b/cpp/demo/Glacier/session/sessionS.dsp
@@ -0,0 +1,165 @@
+# Microsoft Developer Studio Project File - Name="sessionS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=sessionS - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "sessionS.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "sessionS.mak" CFG="sessionS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "sessionS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "sessionS - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "sessionS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../lib"
+# SUBTRACT LINK32 /debug /nodefaultlib
+
+!ELSEIF "$(CFG)" == "sessionS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /GZ /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF
+
+# Begin Target
+
+# Name "sessionS - Win32 Release"
+# Name "sessionS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Hello.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\HelloI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Server.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Hello.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\HelloI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Hello.ice
+
+!IF "$(CFG)" == "sessionS - Win32 Release"
+
+USERDEP__HELLO="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Hello.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Hello.ice \
+
+
+"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Hello.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "sessionS - Win32 Debug"
+
+USERDEP__HELLO="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Hello.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Hello.ice \
+
+
+"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Hello.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/demo/Ice/callback/config b/cpp/demo/Ice/callback/config
index 366bfd72943..badd68fda4d 100644
--- a/cpp/demo/Ice/callback/config
+++ b/cpp/demo/Ice/callback/config
@@ -12,11 +12,11 @@ Ice.SSL.Server.CertPath=../../../certs
Ice.SSL.Server.Config=sslconfig.xml
Glacier.Router.Endpoints=default -p 10005
-Glacier.Client.Endpoints=tcp:udp -c:ssl
-Glacier.Server.Endpoints=tcp:udp:ssl
-Glacier.Trace.Client=2
-Glacier.Trace.Server=2
-Glacier.Trace.RoutingTable=1
+Glacier.Router.Client.Endpoints=tcp:udp -c:ssl
+Glacier.Router.Server.Endpoints=tcp:udp:ssl
+Glacier.Router.Trace.Client=2
+Glacier.Router.Trace.Server=2
+Glacier.Router.Trace.RoutingTable=1
# Uncomment the following lines if you want to run this demo with Glacier
Ice.DefaultRouter=Glacier/router:default -p 10005
diff --git a/cpp/demo/Ice/hello/config b/cpp/demo/Ice/hello/config
index 60f69fb99cf..978091490a3 100644
--- a/cpp/demo/Ice/hello/config
+++ b/cpp/demo/Ice/hello/config
@@ -58,9 +58,9 @@ Ice.SSL.Server.Config=sslconfig.xml
# Glacier settings
#
Glacier.Router.Endpoints=default -p 10005
-Glacier.Client.Endpoints=tcp:udp:ssl
-Glacier.Trace.Client=2
-Glacier.Trace.RoutingTable=1
+Glacier.Router.Client.Endpoints=tcp:udp:ssl
+Glacier.Router.Trace.Client=2
+Glacier.Router.Trace.RoutingTable=1
#
# Uncomment the following lines if you want to run this demo with Glacier
diff --git a/cpp/demo/Ice/latency/config b/cpp/demo/Ice/latency/config
index 8915a57a673..83cce8b3f1b 100644
--- a/cpp/demo/Ice/latency/config
+++ b/cpp/demo/Ice/latency/config
@@ -7,7 +7,7 @@ Ice.SSL.Server.CertPath=../../../certs
Ice.SSL.Server.Config=./sslconfig.xml
Glacier.Router.Endpoints=default -p 10005
-Glacier.Client.Endpoints=default
+Glacier.Router.Client.Endpoints=default
# Uncomment the following lines if you want to run this demo with Glacier
#Ice.DefaultRouter=Glacier/router:default -p 10005
diff --git a/cpp/demo/Ice/nested/config b/cpp/demo/Ice/nested/config
index 61d1487acca..f83d7da6519 100644
--- a/cpp/demo/Ice/nested/config
+++ b/cpp/demo/Ice/nested/config
@@ -13,11 +13,11 @@ Ice.SSL.Server.CertPath=../../../certs
Ice.SSL.Server.Config=sslconfig.xml
Glacier.Router.Endpoints=default -p 10005
-Glacier.Client.Endpoints=default
-Glacier.Server.Endpoints=default
-Glacier.Trace.Client=2
-Glacier.Trace.Server=2
-Glacier.Trace.RoutingTable=1
+Glacier.Router.Client.Endpoints=default
+Glacier.Router.Server.Endpoints=default
+Glacier.Router.Trace.Client=2
+Glacier.Router.Trace.Server=2
+Glacier.Router.Trace.RoutingTable=1
# Uncomment the following lines if you want to run this demo with Glacier
#Ice.DefaultRouter=Glacier/router:default -p 10005
diff --git a/cpp/demo/Ice/value/config b/cpp/demo/Ice/value/config
index f1154b2634b..b1c6aec7175 100644
--- a/cpp/demo/Ice/value/config
+++ b/cpp/demo/Ice/value/config
@@ -7,9 +7,9 @@ Ice.SSL.Server.CertPath=../../../certs
Ice.SSL.Server.Config=sslconfig.xml
Glacier.Router.Endpoints=default -p 10005
-Glacier.Client.Endpoints=default
-Glacier.Trace.Client=2
-Glacier.Trace.RoutingTable=1
+Glacier.Router.Client.Endpoints=default
+Glacier.Router.Trace.Client=2
+Glacier.Router.Trace.RoutingTable=1
# Uncomment the following lines if you want to run this demo with Glacier
#Ice.DefaultRouter=Glacier/router:default -p 10005
diff --git a/cpp/doc/Properties.sgml b/cpp/doc/Properties.sgml
index 5142c9f5341..ee0b7701992 100644
--- a/cpp/doc/Properties.sgml
+++ b/cpp/doc/Properties.sgml
@@ -255,9 +255,9 @@ Ice.DefaultRouter=<replaceable>router</replaceable>
<section>
<title>Description</title>
<para>
-Specifies a default router (as stingified object reference to the
-&Glacier; router control interface) which is to be used for all
-Proxies, unless the router is overwritten with the Proxy's
+Specifies a default router (as stingified proxy to the &Glacier;
+router control interface) which is to be used for all Proxies, unless
+the router is overwritten with the Proxy's
<literal>ice_router()</literal> operation. The default value is no
router.
</para>
@@ -273,8 +273,8 @@ Ice.Adapter.<replaceable>name</replaceable>.Router=<replaceable>router</replacea
<section>
<title>Description</title>
<para>
-Specifies a router (as stingified object reference to the &Glacier;
-router control interface) for the object adapter with the name
+Specifies a router (as stingified proxy to the &Glacier; router
+control interface) for the object adapter with the name
<replaceable>name</replaceable>. By doing so, the object adapter can
receive callbacks from this router, using connections which are
established from this process to the router, instead of the router
@@ -827,12 +827,12 @@ property is 100 ms.
<section><title>&Glacier; Router Properties</title>
<!-- ********************************************************************** -->
-<section><title>Glacier.Router.Endpoints, Glacier.Client.Endpoints, Glacier.Server.Endpoints</title>
+<section><title>Glacier.Router.Endpoints, Glacier.Router.Client.Endpoints, Glacier.Router.Server.Endpoints</title>
<section><title>Synopsis</title>
<synopsis>
Glacier.Router.Endpoints=<replaceable>endpoints</replaceable>
-Glacier.Client.Endpoints=<replaceable>endpoints</replaceable>
-Glacier.Server.Endpoints=<replaceable>endpoints</replaceable>
+Glacier.Router.Client.Endpoints=<replaceable>endpoints</replaceable>
+Glacier.Router.Server.Endpoints=<replaceable>endpoints</replaceable>
</synopsis>
</section>
<section>
@@ -883,10 +883,10 @@ router starter only. It should not be set manually.
</section>
</section>
-<section><title>Glacier.Trace.Client</title>
+<section><title>Glacier.Router.Trace.Client</title>
<section><title>Synopsis</title>
<synopsis>
-Glacier.Trace.Client=<replaceable>num</replaceable>
+Glacier.Router.Trace.Client=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
@@ -918,10 +918,10 @@ the client to the server.
</section>
</section>
-<section><title>Glacier.Trace.Server</title>
+<section><title>Glacier.Router.Trace.Server</title>
<section><title>Synopsis</title>
<synopsis>
-Glacier.Trace.Server=<replaceable>num</replaceable>
+Glacier.Router.Trace.Server=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
@@ -953,10 +953,10 @@ callbacks from the server to the client.
</section>
</section>
-<section><title>Glacier.Trace.RoutingTable</title>
+<section><title>Glacier.Router.Trace.RoutingTable</title>
<section><title>Synopsis</title>
<synopsis>
-Glacier.Trace.RoutingTable=<replaceable>num</replaceable>
+Glacier.Router.Trace.RoutingTable=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
@@ -982,6 +982,53 @@ The routing table tracing level:
</section>
</section>
+<section><title>Glacier.Router.SessionManager</title>
+<section><title>Synopsis</title>
+<synopsis>
+Glacier.Router.SessionManager=<replaceable>proxy</replaceable>
+</synopsis>
+</section>
+<section>
+<title>Description</title>
+<para>
+A stringified proxy to the session manager inteface. If not specified,
+it is not possible to use the <literal>Router::createSession</literal>
+method.
+</para>
+</section>
+</section>
+
+<section><title>Glacier.Router.UserId</title>
+<section><title>Synopsis</title>
+<synopsis>
+Glacier.Router.UserId=<replaceable>name</replaceable>
+</synopsis>
+</section>
+<section>
+<title>Description</title>
+<para>
+The authenticated userId of the remote user.
+</para>
+</section>
+</section>
+
+<section><title>Glacier.Router.AllowCategories</title>
+<section><title>Synopsis</title>
+<synopsis>
+Glacier.Router.AllowCategories=<replaceable>list</replaceable>
+</synopsis>
+</section>
+<section>
+<title>Description</title>
+<para>
+A whitespace seperated list of categories. If this property is set
+then requests are only permitted to identities with a category found
+in this list.
+</para>
+</section>
+</section>
+
+
</section>
<!-- ********************************************************************** -->
@@ -1095,10 +1142,25 @@ only.)
</section>
</section>
-<section><title>Glacier.Trace.Starter</title>
+<section><title>Glacier.Starter.AddUserToAllowCategories</title>
+<section><title>Synopsis</title>
+<synopsis>
+Glacier.Starter.AddUserToAllowCategories=<replaceable>value</replaceable>
+</synopsis>
+</section>
+<section>
+<title>Description</title>
+<para>
+If present the userId is added to the
+<literal>Glacier.Router.AllowCategories</literal> property.
+</para>
+</section>
+</section>
+
+<section><title>Glacier.Starter.Trace</title>
<section><title>Synopsis</title>
<synopsis>
-Glacier.Trace.Starter=<replaceable>num</replaceable>
+Glacier.Starter.Trace=<replaceable>num</replaceable>
</synopsis>
</section>
<section>
diff --git a/cpp/include/Glacier/Glacier.h b/cpp/include/Glacier/Glacier.h
new file mode 100644
index 00000000000..ac1e0426a34
--- /dev/null
+++ b/cpp/include/Glacier/Glacier.h
@@ -0,0 +1,18 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef GLACIER_H
+#define GLACIER_H
+
+#include <Glacier/Starter.h>
+#include <Glacier/Session.h>
+#include <Glacier/SessionManager.h>
+
+#endif
diff --git a/cpp/slice/Glacier/Router.ice b/cpp/slice/Glacier/Router.ice
new file mode 100644
index 00000000000..2bea5b3cd02
--- /dev/null
+++ b/cpp/slice/Glacier/Router.ice
@@ -0,0 +1,61 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef GLACIER_ROUTER_ICE
+#define GLACIER_ROUTER_ICE
+
+#include <Ice/Router.ice>
+#include <Glacier/SessionF.ice>
+
+module Glacier
+{
+
+/**
+ *
+ * This exception is raised if no [SessionManager] object has been
+ * configured.
+ *
+ **/
+exception NoSessionManagerException
+{
+};
+
+/**
+ *
+ * The Glacier router interface.
+ *
+ **/
+interface Router extends Ice::Router
+{
+ /**
+ *
+ * Shutdown the router.
+ *
+ **/
+ void shutdown();
+
+ /**
+ *
+ * Create a new session. The Session is automatically shutdown
+ * when the Router terminates.
+ *
+ * @return A proxy to the new Session.
+ *
+ * @throws NoSessionManagerException if there is no
+ * configured [SessionManager].
+ *
+ **/
+ Session* createSession()
+ throws NoSessionManagerException;
+};
+
+};
+
+#endif
diff --git a/cpp/slice/Glacier/Session.ice b/cpp/slice/Glacier/Session.ice
new file mode 100644
index 00000000000..b5ea5908ec2
--- /dev/null
+++ b/cpp/slice/Glacier/Session.ice
@@ -0,0 +1,38 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef GLACIER_SESSION_ICE
+#define GLACIER_SESSION_ICE
+
+module Glacier
+{
+
+/**
+ *
+ * A Session object which is tied to the lifecycle of an [Router].
+ *
+ * @see Router
+ * @see SessionManager
+ *
+ **/
+interface Session
+{
+ /**
+ *
+ * Stop the session. This is called automatically when the
+ * [Router] terminates.
+ *
+ **/
+ void stop();
+};
+
+};
+
+#endif
diff --git a/cpp/slice/Glacier/SessionF.ice b/cpp/slice/Glacier/SessionF.ice
new file mode 100644
index 00000000000..afdd956869b
--- /dev/null
+++ b/cpp/slice/Glacier/SessionF.ice
@@ -0,0 +1,21 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef GLACIER_SESSION_F_ICE
+#define GLACIER_SESSION_F_ICE
+
+module Glacier
+{
+
+interface Session;
+
+};
+
+#endif
diff --git a/cpp/slice/Glacier/SessionManager.ice b/cpp/slice/Glacier/SessionManager.ice
new file mode 100644
index 00000000000..2d1fa90b053
--- /dev/null
+++ b/cpp/slice/Glacier/SessionManager.ice
@@ -0,0 +1,45 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef GLACIER_SESSION_MANAGER_ICE
+#define GLACIER_SESSION_MANAGER_ICE
+
+#include <Glacier/SessionF.ice>
+
+module Glacier
+{
+
+/**
+ *
+ * The Session Manager, which is responsible for managing [Session]
+ * objects. New Session objects are created from the [Router] object.
+ *
+ * @see Session
+ *
+ **/
+interface SessionManager
+{
+ /**
+ *
+ * Create a new Session object.
+ *
+ * @param userId The user id for the session.
+ *
+ * @return A proxy to the newly created Session.
+ *
+ * @see Properties
+ *
+ **/
+ Session* create(string userId);
+};
+
+};
+
+#endif
diff --git a/cpp/slice/Glacier/SessionManagerF.ice b/cpp/slice/Glacier/SessionManagerF.ice
new file mode 100644
index 00000000000..d11558888b5
--- /dev/null
+++ b/cpp/slice/Glacier/SessionManagerF.ice
@@ -0,0 +1,21 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef GLACIER_SESSION_MANAGER_F_ICE
+#define GLACIER_SESSION_MANAGER_F_ICE
+
+module Glacier
+{
+
+interface SessionManager;
+
+};
+
+#endif
diff --git a/cpp/slice/Glacier/Glacier.ice b/cpp/slice/Glacier/Starter.ice
index 5f997f1bc32..2927d91fe19 100644
--- a/cpp/slice/Glacier/Glacier.ice
+++ b/cpp/slice/Glacier/Starter.ice
@@ -11,7 +11,7 @@
#ifndef GLACIER_ICE
#define GLACIER_ICE
-#include <Ice/Router.ice>
+#include <Glacier/Router.ice>
#include <Ice/BuiltinSequences.ice>
/**
@@ -71,7 +71,7 @@ interface Starter
* given user id is not correct.
*
**/
- Ice::Router* startRouter(string userId, string password;
+ Glacier::Router* startRouter(string userId, string password;
Ice::ByteSeq privateKey, Ice::ByteSeq publicKey, Ice::ByteSeq routerCert)
throws InvalidPasswordException, CannotStartRouterException;
};
@@ -96,15 +96,6 @@ interface PasswordVerifier
**/
["nonmutating"]
bool checkPassword(string userId, string password);
-
- /**
- *
- * Called when the password verifier is not needed anymore by the
- * &Glacier; router starter.
- *
- **/
- ["nonmutating"]
- void destroy();
};
};
diff --git a/cpp/slice/Ice/Router.ice b/cpp/slice/Ice/Router.ice
index 5d584a4a385..9c0ed828d40 100644
--- a/cpp/slice/Ice/Router.ice
+++ b/cpp/slice/Ice/Router.ice
@@ -20,10 +20,10 @@ module Ice
* [Communicator::setGlobalRouter], or with [ice_router] on specific
* Proxies.
*
- * <note><para> This router interface is intended to be used by Ice
- * internals and by router implementations. Regular user code should
- * not attempt to use any functionality of this interface
- * directly. </para></note>
+ * <note><para> The router interface is not intended to be used by
+ * Ice internals and by router implementations. Regular user code
+ * should not attempt to use any functionality of this interface
+ * directly.</para></note>
*
**/
interface Router
@@ -56,13 +56,6 @@ interface Router
*
**/
void addProxy(Object* proxy);
-
- /**
- *
- * Shutdown the router.
- *
- **/
- void shutdown();
};
};
diff --git a/cpp/src/Glacier/.depend b/cpp/src/Glacier/.depend
index 69a49a39fe8..59ab583dce5 100644
--- a/cpp/src/Glacier/.depend
+++ b/cpp/src/Glacier/.depend
@@ -1,7 +1,10 @@
-Glacier.o: Glacier.cpp ../../include/Glacier/Glacier.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Router.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/LocalException.h ../../include/Ice/ObjectFactory.h ../../include/Ice/Stream.h
-GlacierRouter.o: GlacierRouter.cpp ../../include/Ice/Application.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LocalException.h ../../include/Ice/Identity.h ../../include/Ice/Properties.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/SystemF.h ../../include/Ice/SslExtensionF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Ice/RoutingTable.h ../../include/Ice/RoutingTableF.h ../Glacier/RouterI.h ../../include/Ice/Router.h ../Glacier/ClientBlobject.h ../Glacier/ServerBlobject.h ../../include/IceUtil/Base64.h ../../include/Ice/CertificateVerifierF.h ../../include/Ice/System.h ../../include/Ice/SslExtension.h
-RouterI.o: RouterI.cpp ../../include/Ice/RoutingTable.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Lock.h ../../include/Ice/RoutingTableF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../Glacier/RouterI.h ../../include/Ice/Router.h ../../include/Ice/LocalObjectF.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/StreamF.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/SystemF.h ../../include/Ice/SslExtensionF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h
+Starter.o: Starter.cpp ../../include/Glacier/Starter.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Glacier/Router.h ../../include/Ice/Router.h ../../include/Glacier/SessionF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/LocalException.h ../../include/Ice/ObjectFactory.h ../../include/Ice/Stream.h
+Router.o: Router.cpp ../../include/Glacier/Router.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Router.h ../../include/Glacier/SessionF.h ../../include/Ice/LocalException.h ../../include/Ice/ObjectFactory.h ../../include/Ice/Stream.h ../../include/Ice/BuiltinSequences.h
+Session.o: Session.cpp ../../include/Glacier/Session.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/ObjectFactory.h ../../include/Ice/Stream.h ../../include/Ice/BuiltinSequences.h
+SessionManager.o: SessionManager.cpp ../../include/Glacier/SessionManager.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Glacier/SessionF.h ../../include/Ice/LocalException.h ../../include/Ice/ObjectFactory.h ../../include/Ice/Stream.h ../../include/Ice/BuiltinSequences.h
+GlacierRouter.o: GlacierRouter.cpp ../../include/Ice/Application.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LocalException.h ../../include/Ice/Identity.h ../../include/Ice/Properties.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/SystemF.h ../../include/Ice/SslExtensionF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Ice/RoutingTable.h ../../include/Ice/RoutingTableF.h ../Glacier/RouterI.h ../../include/Glacier/Router.h ../../include/Ice/Router.h ../../include/Glacier/SessionF.h ../../include/Glacier/SessionManagerF.h ../Glacier/ClientBlobject.h ../Glacier/ServerBlobject.h ../../include/Glacier/SessionManager.h ../../include/IceUtil/Base64.h ../../include/Ice/CertificateVerifierF.h ../../include/Ice/System.h ../../include/Ice/SslExtension.h
+RouterI.o: RouterI.cpp ../../include/Ice/RoutingTable.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Lock.h ../../include/Ice/RoutingTableF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../Glacier/RouterI.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LocalException.h ../../include/Ice/Identity.h ../../include/Ice/Properties.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/SystemF.h ../../include/Ice/SslExtensionF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Glacier/Router.h ../../include/Ice/Router.h ../../include/Glacier/SessionF.h ../../include/Glacier/SessionManagerF.h ../../include/Glacier/Session.h ../../include/Glacier/SessionManager.h
ClientBlobject.o: ClientBlobject.cpp ../../include/Ice/RoutingTable.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Lock.h ../../include/Ice/RoutingTableF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../Glacier/ClientBlobject.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LocalException.h ../../include/Ice/Identity.h ../../include/Ice/Properties.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/SystemF.h ../../include/Ice/SslExtensionF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h
ServerBlobject.o: ServerBlobject.cpp ../../include/Ice/RoutingTable.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Lock.h ../../include/Ice/RoutingTableF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../Glacier/ServerBlobject.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LocalException.h ../../include/Ice/Identity.h ../../include/Ice/Properties.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/SystemF.h ../../include/Ice/SslExtensionF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h
-GlacierStarter.o: GlacierStarter.cpp ../../include/Ice/Application.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LocalException.h ../../include/Ice/Identity.h ../../include/Ice/Properties.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/SystemF.h ../../include/Ice/SslExtensionF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../Glacier/GlacierI.h ../../include/Ice/RSACertificateGen.h ../../include/Ice/RSAKeyPairF.h ../../include/Glacier/Glacier.h ../../include/Ice/Router.h
-GlacierI.o: GlacierI.cpp ../../include/IceUtil/UUID.h ../../include/IceUtil/Config.h ../../include/Ice/RSAKeyPair.h ../../include/IceUtil/Shared.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/StreamF.h ../../include/Ice/RSAKeyPairF.h ../../include/Ice/RSACertificateGenF.h ../../include/Ice/RSAPrivateKeyF.h ../../include/Ice/RSAPublicKeyF.h ../Glacier/GlacierI.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LocalException.h ../../include/Ice/Identity.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/SystemF.h ../../include/Ice/SslExtensionF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Ice/RSACertificateGen.h ../../include/Glacier/Glacier.h ../../include/Ice/Router.h
+GlacierStarter.o: GlacierStarter.cpp ../../include/Ice/Application.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LocalException.h ../../include/Ice/Identity.h ../../include/Ice/Properties.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/SystemF.h ../../include/Ice/SslExtensionF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../Glacier/StarterI.h ../../include/Ice/RSACertificateGen.h ../../include/Ice/RSAKeyPairF.h ../../include/Glacier/Starter.h ../../include/Glacier/Router.h ../../include/Ice/Router.h ../../include/Glacier/SessionF.h
+StarterI.o: StarterI.cpp ../../include/IceUtil/UUID.h ../../include/IceUtil/Config.h ../../include/Ice/RSAKeyPair.h ../../include/IceUtil/Shared.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/StreamF.h ../../include/Ice/RSAKeyPairF.h ../../include/Ice/RSACertificateGenF.h ../../include/Ice/RSAPrivateKeyF.h ../../include/Ice/RSAPublicKeyF.h ../Glacier/StarterI.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LocalException.h ../../include/Ice/Identity.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/SystemF.h ../../include/Ice/SslExtensionF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Ice/RSACertificateGen.h ../../include/Glacier/Starter.h ../../include/Glacier/Router.h ../../include/Ice/Router.h ../../include/Glacier/SessionF.h
diff --git a/cpp/src/Glacier/ClientBlobject.cpp b/cpp/src/Glacier/ClientBlobject.cpp
index d86509ffb6f..cec339c1829 100644
--- a/cpp/src/Glacier/ClientBlobject.cpp
+++ b/cpp/src/Glacier/ClientBlobject.cpp
@@ -9,6 +9,8 @@
// **********************************************************************
#include <Ice/RoutingTable.h>
+#include <Ice/IdentityUtil.h>
+
#include <Glacier/ClientBlobject.h>
using namespace std;
@@ -16,13 +18,25 @@ using namespace Ice;
using namespace Glacier;
Glacier::ClientBlobject::ClientBlobject(const CommunicatorPtr& communicator,
- const IceInternal::RoutingTablePtr& routingTable) :
+ const IceInternal::RoutingTablePtr& routingTable,
+ const string& allowCategories) :
_communicator(communicator),
_logger(_communicator->getLogger()),
_routingTable(routingTable)
{
PropertiesPtr properties = _communicator->getProperties();
- _traceLevel = properties->getPropertyAsInt("Glacier.Trace.Client");
+ _traceLevel = properties->getPropertyAsInt("Glacier.Router.Trace.Client");
+
+ size_t current = 0;
+ const string ws = " \t";
+ do
+ {
+ size_t pos = allowCategories.find_first_of(ws, current);
+ size_t len = (pos == string::npos) ? string::npos : pos - current;
+ _allowCategories.insert(allowCategories.substr(current, len));
+ current = allowCategories.find_first_not_of(ws, pos);
+ }
+ while (current != string::npos);
}
Glacier::ClientBlobject::~ClientBlobject()
@@ -48,13 +62,33 @@ Glacier::ClientBlobject::ice_invoke(const std::vector<Byte>& inParams, std::vect
{
assert(_communicator); // Destroyed?
+ //
+ // If there is an allowCategories set then enforce it.
+ //
+ if (!_allowCategories.empty())
+ {
+ if (_allowCategories.find(current.identity.category) == _allowCategories.end())
+ {
+ if (_traceLevel > 0)
+ {
+ Trace out(_logger, "Glacier");
+ out << "rejecting request. identity: " << identityToString(current.identity);
+ }
+ ObjectNotExistException ex(__FILE__, __LINE__);
+ ex.identity = current.identity;
+ throw ex;
+ }
+ }
+
try
{
ObjectPrx proxy = _routingTable->get(current.identity);
if (!proxy)
{
- throw ObjectNotExistException(__FILE__, __LINE__);
+ ObjectNotExistException ex(__FILE__, __LINE__);
+ ex.identity = current.identity;
+ throw ex;
}
if (!current.facet.empty())
diff --git a/cpp/src/Glacier/ClientBlobject.h b/cpp/src/Glacier/ClientBlobject.h
index 2cab53df493..09848dae8b1 100644
--- a/cpp/src/Glacier/ClientBlobject.h
+++ b/cpp/src/Glacier/ClientBlobject.h
@@ -14,6 +14,8 @@
#include <Ice/RoutingTableF.h>
#include <Ice/Ice.h>
+#include <set>
+
namespace Glacier
{
@@ -21,7 +23,7 @@ class ClientBlobject : public Ice::Blobject
{
public:
- ClientBlobject(const Ice::CommunicatorPtr&, const IceInternal::RoutingTablePtr&);
+ ClientBlobject(const Ice::CommunicatorPtr&, const IceInternal::RoutingTablePtr&, const ::std::string&);
virtual ~ClientBlobject();
void destroy();
@@ -33,6 +35,8 @@ private:
Ice::LoggerPtr _logger;
int _traceLevel;
IceInternal::RoutingTablePtr _routingTable;
+
+ ::std::set< ::std::string> _allowCategories;
};
}
diff --git a/cpp/src/Glacier/GlacierRouter.cpp b/cpp/src/Glacier/GlacierRouter.cpp
index eb2bd8f3bad..83e2dd8dbbe 100644
--- a/cpp/src/Glacier/GlacierRouter.cpp
+++ b/cpp/src/Glacier/GlacierRouter.cpp
@@ -13,6 +13,7 @@
#include <Glacier/RouterI.h>
#include <Glacier/ClientBlobject.h>
#include <Glacier/ServerBlobject.h>
+#include <Glacier/SessionManager.h>
#include <IceUtil/Base64.h>
#include <Ice/CertificateVerifierF.h>
#include <Ice/System.h>
@@ -41,7 +42,7 @@ private:
::Ice::ObjectPtr _blobject;
};
-class Router : public Application
+class RouterApp : public Application
{
public:
@@ -87,7 +88,7 @@ Glacier::ServantLocator::deactivate()
}
void
-Glacier::Router::usage()
+Glacier::RouterApp::usage()
{
cerr << "Usage: " << appName() << " [options]\n";
cerr <<
@@ -98,7 +99,7 @@ Glacier::Router::usage()
}
int
-Glacier::Router::run(int argc, char* argv[])
+Glacier::RouterApp::run(int argc, char* argv[])
{
for (int i = 1; i < argc; ++i)
{
@@ -159,7 +160,7 @@ Glacier::Router::run(int argc, char* argv[])
//
// Initialize the client object adapter.
//
- const char* clientEndpointsProperty = "Glacier.Client.Endpoints";
+ const char* clientEndpointsProperty = "Glacier.Router.Client.Endpoints";
string clientEndpoints = properties->getProperty(clientEndpointsProperty);
if (clientEndpoints.empty())
{
@@ -172,7 +173,7 @@ Glacier::Router::run(int argc, char* argv[])
//
// Initialize the server object adapter.
//
- const char* serverEndpointsProperty = "Glacier.Server.Endpoints";
+ const char* serverEndpointsProperty = "Glacier.Router.Server.Endpoints";
string serverEndpoints = properties->getProperty(serverEndpointsProperty);
ObjectAdapterPtr serverAdapter;
if (!serverEndpoints.empty())
@@ -180,11 +181,14 @@ Glacier::Router::run(int argc, char* argv[])
serverAdapter = communicator()->createObjectAdapterFromProperty("Server", serverEndpointsProperty);
}
+ const char* allowCategoriesProperty = "Glacier.Router.AllowCategories";
+ string allowCategories = properties->getProperty(allowCategoriesProperty);
+
//
// Create the client and server blobjects and the associated
// servant locators.
//
- ObjectPtr clientBlobject = new ClientBlobject(communicator(), routingTable);
+ ObjectPtr clientBlobject = new ClientBlobject(communicator(), routingTable, allowCategories);
Ice::ServantLocatorPtr clientServantLocator = new Glacier::ServantLocator(clientBlobject);
clientAdapter->addServantLocator(clientServantLocator, "");
if (serverAdapter)
@@ -204,15 +208,25 @@ Glacier::Router::run(int argc, char* argv[])
cerr << appName() << ": property `" << routerEndpointsProperty << "' is not set" << endl;
return EXIT_FAILURE;
}
+
const char* routerIdentityProperty = "Glacier.Router.Identity";
- string routerIdentity = properties->getProperty(routerIdentityProperty);
- if (routerIdentity.empty())
+ string routerIdentity = properties->getPropertyWithDefault(routerIdentityProperty, "Glacier/router");
+
+ const char* sessionManagerProperty = "Glacier.Router.SessionManager";
+ string sessionManager = properties->getProperty(sessionManagerProperty);
+
+ SessionManagerPrx sessionManagerPrx;
+ if (!sessionManager.empty())
{
- routerIdentity = "Glacier/router";
+ sessionManagerPrx = SessionManagerPrx::checkedCast(communicator()->stringToProxy(sessionManager));
}
+
+ const char* userIdProperty = "Glacier.Router.UserId";
+ string userId = properties->getProperty(userIdProperty);
+
ObjectAdapterPtr routerAdapter =
communicator()->createObjectAdapterFromProperty("Router", routerEndpointsProperty);
- RouterPtr router = new RouterI(clientAdapter, serverAdapter, routingTable);
+ RouterPtr router = new RouterI(clientAdapter, serverAdapter, routingTable, sessionManagerPrx, userId);
routerAdapter->add(router, stringToIdentity(routerIdentity));
#ifndef _WIN32
@@ -290,6 +304,6 @@ main(int argc, char* argv[])
}
defaultProperties->setProperty("Ice.DefaultRouter", "");
- Glacier::Router app;
+ Glacier::RouterApp app;
return app.main(argc, argv);
}
diff --git a/cpp/src/Glacier/GlacierStarter.cpp b/cpp/src/Glacier/GlacierStarter.cpp
index cddb35541b3..72a62255d84 100644
--- a/cpp/src/Glacier/GlacierStarter.cpp
+++ b/cpp/src/Glacier/GlacierStarter.cpp
@@ -13,7 +13,7 @@
#endif
#include <Ice/Application.h>
-#include <Glacier/GlacierI.h>
+#include <Glacier/StarterI.h>
#include <signal.h>
#include <sys/wait.h>
#include <fstream>
@@ -24,7 +24,7 @@ using namespace Ice;
namespace Glacier
{
-class Router : public Application
+class RouterApp : public Application
{
public:
@@ -35,7 +35,7 @@ public:
};
void
-Glacier::Router::usage()
+Glacier::RouterApp::usage()
{
cerr << "Usage: " << appName() << " [options]\n";
cerr <<
@@ -46,7 +46,7 @@ Glacier::Router::usage()
}
int
-Glacier::Router::run(int argc, char* argv[])
+Glacier::RouterApp::run(int argc, char* argv[])
{
for (int i = 1; i < argc; ++i)
{
@@ -88,7 +88,6 @@ Glacier::Router::run(int argc, char* argv[])
//
string verifierProperty = properties->getProperty("Glacier.Starter.PasswordVerifier");
PasswordVerifierPrx verifier;
- PasswordVerifierPtr verifierImpl;
if (!verifierProperty.empty())
{
verifier = PasswordVerifierPrx::checkedCast(communicator()->stringToProxy(verifierProperty));
@@ -133,7 +132,7 @@ Glacier::Router::run(int argc, char* argv[])
passwords.insert(make_pair(userId, password));
}
- verifierImpl = new CryptPasswordVerifierI(passwords);
+ PasswordVerifierPtr verifierImpl = new CryptPasswordVerifierI(passwords);
verifier = PasswordVerifierPrx::uncheckedCast(adapter->addWithUUID(verifierImpl));
}
@@ -152,24 +151,11 @@ Glacier::Router::run(int argc, char* argv[])
ignoreInterrupt();
//
- // Destroy the starter and the password verifier.
+ // Destroy the starter.
//
StarterI* st = dynamic_cast<StarterI*>(starter.get());
assert(st);
st->destroy();
- if (verifierImpl)
- {
- //
- // Can't use proxy to shutdown if the verifier is collocated,
- // since the object adapter is already shut down at this
- // point. Thus I have to use the implementation.
- //
- verifierImpl->destroy();
- }
- else
- {
- verifier->destroy();
- }
return EXIT_SUCCESS;
}
@@ -211,6 +197,6 @@ main(int argc, char* argv[])
}
defaultProperties->setProperty("Ice.DefaultRouter", "");
- Glacier::Router app;
+ Glacier::RouterApp app;
return app.main(argc, argv);
}
diff --git a/cpp/src/Glacier/Makefile b/cpp/src/Glacier/Makefile
index dc426d8540b..bd45fc05715 100644
--- a/cpp/src/Glacier/Makefile
+++ b/cpp/src/Glacier/Makefile
@@ -16,12 +16,15 @@ VERSIONED_BASE = $(BASE).$(VERSION)
NAME = $(top_srcdir)/lib/$(BASE)
VERSIONED_NAME = $(top_srcdir)/lib/$(VERSIONED_BASE)
-ROUTER = $(top_srcdir)/bin/glacier
+ROUTER = $(top_srcdir)/bin/glacierrouter
STARTER = $(top_srcdir)/bin/glacierstarter
TARGETS = $(NAME) $(VERSIONED_NAME) $(ROUTER) $(STARTER)
-OBJS = Glacier.o
+OBJS = Starter.o \
+ Router.o \
+ Session.o \
+ SessionManager.o
ROBJS = GlacierRouter.o \
RouterI.o \
@@ -29,7 +32,7 @@ ROBJS = GlacierRouter.o \
ServerBlobject.o
SOBJS = GlacierStarter.o \
- GlacierI.o
+ StarterI.o
SRCS = $(OBJS:.o=.cpp) \
$(ROBJS:.o=.cpp) \
@@ -53,18 +56,60 @@ $(NAME): $(VERSIONED_NAME)
$(ROUTER): $(ROBJS)
rm -f $@
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(ROBJS) $(LIBS)
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(ROBJS) -lGlacier $(LIBS)
$(STARTER): $(SOBJS)
rm -f $@
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(SOBJS) -lGlacier $(LIBS)
-$(HDIR)/Glacier.h Glacier.cpp: $(SDIR)/Glacier.ice $(SLICE2CPP)
- rm -f $(HDIR)/Glacier.h Glacier.cpp
- $(SLICECMD) $(SDIR)/Glacier.ice
- mv Glacier.h $(HDIR)
+$(HDIR)/Starter.h Starter.cpp: $(SDIR)/Starter.ice $(SLICE2CPP)
+ rm -f $(HDIR)/Starter.h Starter.cpp
+ $(SLICECMD) $(SDIR)/Starter.ice
+ mv Starter.h $(HDIR)
clean::
- rm -f $(HDIR)/Glacier.h Glacier.cpp
+ rm -f $(HDIR)/Starter.h Starter.cpp
+
+$(HDIR)/Router.h Router.cpp: $(SDIR)/Router.ice $(SLICE2CPP)
+ rm -f $(HDIR)/Router.h Router.cpp
+ $(SLICECMD) $(SDIR)/Router.ice
+ mv Router.h $(HDIR)
+
+clean::
+ rm -f $(HDIR)/Router.h Router.cpp
+
+$(HDIR)/Session.h Session.cpp: $(SDIR)/Session.ice $(SLICE2CPP)
+ rm -f $(HDIR)/Session.h Session.cpp
+ $(SLICECMD) $(SDIR)/Session.ice
+ mv Session.h $(HDIR)
+
+clean::
+ rm -f $(HDIR)/Session.h Session.cpp
+
+$(HDIR)/SessionF.h: $(SDIR)/SessionF.ice $(SLICE2CPP)
+ rm -f $(HDIR)/SessionF.h SessionF.cpp
+ $(SLICECMD) $(SDIR)/SessionF.ice
+ mv SessionF.h $(HDIR)
+ rm -f SessionF.cpp
+
+clean::
+ rm -f $(HDIR)/SessionF.h
+
+$(HDIR)/SessionManager.h SessionManager.cpp: $(SDIR)/SessionManager.ice $(SLICE2CPP)
+ rm -f $(HDIR)/SessionManager.h SessionManager.cpp
+ $(SLICECMD) $(SDIR)/SessionManager.ice
+ mv SessionManager.h $(HDIR)
+
+clean::
+ rm -f $(HDIR)/SessionManager.h SessionManager.cpp
+
+$(HDIR)/SessionManagerF.h: $(SDIR)/SessionManagerF.ice $(SLICE2CPP)
+ rm -f $(HDIR)/SessionManagerF.h SessionManagerF.cpp
+ $(SLICECMD) $(SDIR)/SessionManagerF.ice
+ mv SessionManagerF.h $(HDIR)
+ rm -f SessionManagerF.cpp
+
+clean::
+ rm -f $(HDIR)/SessionManagerF.h
include .depend
diff --git a/cpp/src/Glacier/RouterI.cpp b/cpp/src/Glacier/RouterI.cpp
index 64ef77077d1..0876787bd86 100644
--- a/cpp/src/Glacier/RouterI.cpp
+++ b/cpp/src/Glacier/RouterI.cpp
@@ -10,6 +10,8 @@
#include <Ice/RoutingTable.h>
#include <Glacier/RouterI.h>
+#include <Glacier/Session.h>
+#include <Glacier/SessionManager.h>
#include <iostream>
using namespace std;
@@ -18,14 +20,18 @@ using namespace Glacier;
Glacier::RouterI::RouterI(const ObjectAdapterPtr& clientAdapter,
const ObjectAdapterPtr& serverAdapter,
- const ::IceInternal::RoutingTablePtr& routingTable) :
+ const ::IceInternal::RoutingTablePtr& routingTable,
+ const SessionManagerPrx& sessionManager,
+ const string& userId) :
_clientAdapter(clientAdapter),
_serverAdapter(serverAdapter),
_logger(_clientAdapter->getCommunicator()->getLogger()),
- _routingTable(routingTable)
+ _routingTable(routingTable),
+ _sessionManager(sessionManager),
+ _userId(userId)
{
PropertiesPtr properties = _clientAdapter->getCommunicator()->getProperties();
- _routingTableTraceLevel = properties->getPropertyAsInt("Glacier.Trace.RoutingTable");
+ _routingTableTraceLevel = properties->getPropertyAsInt("Glacier.Router.Trace.RoutingTable");
}
Glacier::RouterI::~RouterI()
@@ -88,4 +94,28 @@ Glacier::RouterI::shutdown(const Current&)
{
assert(_routingTable);
_clientAdapter->getCommunicator()->shutdown();
+
+ IceUtil::Mutex::Lock lock(_sessionMutex);
+
+ for (list<SessionPrx>::const_iterator p = _sessions.begin(); p != _sessions.end(); ++p)
+ {
+ (*p)->stop();
+ }
+ _sessions.clear();
+}
+
+SessionPrx
+Glacier::RouterI::createSession(const Current&)
+{
+ IceUtil::Mutex::Lock lock(_sessionMutex);
+ if (!_sessionManager)
+ {
+ throw NoSessionManagerException();
+ }
+
+ SessionPrx session = _sessionManager->create(_userId);
+ _sessions.push_back(session);
+
+ return session;
}
+
diff --git a/cpp/src/Glacier/RouterI.h b/cpp/src/Glacier/RouterI.h
index bac10665669..9c38887c453 100644
--- a/cpp/src/Glacier/RouterI.h
+++ b/cpp/src/Glacier/RouterI.h
@@ -12,17 +12,23 @@
#define GLACIER_ROUTER_I_H
#include <Ice/RoutingTableF.h>
-#include <Ice/Router.h>
#include <Ice/Ice.h>
+#include <Glacier/Router.h>
+#include <Glacier/SessionManagerF.h>
+
+#include <list>
+
namespace Glacier
{
-class RouterI : public Ice::Router
+class RouterI : public Router
{
public:
- RouterI(const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, const ::IceInternal::RoutingTablePtr&);
+ RouterI(const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, const ::IceInternal::RoutingTablePtr&,
+ const SessionManagerPrx&, const ::std::string&);
+
virtual ~RouterI();
void destroy();
@@ -31,6 +37,7 @@ public:
virtual Ice::ObjectPrx getServerProxy(const Ice::Current&);
virtual void addProxy(const Ice::ObjectPrx&, const Ice::Current&);
virtual void shutdown(const Ice::Current&);
+ virtual SessionPrx createSession(const Ice::Current&);
private:
@@ -39,6 +46,11 @@ private:
Ice::LoggerPtr _logger;
::IceInternal::RoutingTablePtr _routingTable;
int _routingTableTraceLevel;
+
+ IceUtil::Mutex _sessionMutex;
+ SessionManagerPrx _sessionManager;
+ ::std::list<SessionPrx> _sessions;
+ ::std::string _userId;
};
}
diff --git a/cpp/src/Glacier/ServerBlobject.cpp b/cpp/src/Glacier/ServerBlobject.cpp
index 08166cca220..d2ad46a113e 100644
--- a/cpp/src/Glacier/ServerBlobject.cpp
+++ b/cpp/src/Glacier/ServerBlobject.cpp
@@ -20,7 +20,7 @@ Glacier::ServerBlobject::ServerBlobject(const ObjectAdapterPtr& clientAdapter) :
_logger(_clientAdapter->getCommunicator()->getLogger())
{
PropertiesPtr properties = _clientAdapter->getCommunicator()->getProperties();
- _traceLevel = properties->getPropertyAsInt("Glacier.Trace.Server");
+ _traceLevel = properties->getPropertyAsInt("Glacier.Router.Trace.Server");
}
Glacier::ServerBlobject::~ServerBlobject()
diff --git a/cpp/src/Glacier/GlacierI.cpp b/cpp/src/Glacier/StarterI.cpp
index c0b05257d7e..3c6cb9e014e 100644
--- a/cpp/src/Glacier/GlacierI.cpp
+++ b/cpp/src/Glacier/StarterI.cpp
@@ -14,7 +14,7 @@
#include <IceUtil/UUID.h>
#include <Ice/RSAKeyPair.h>
-#include <Glacier/GlacierI.h>
+#include <Glacier/StarterI.h>
#include <fcntl.h>
#include <shadow.h>
@@ -32,7 +32,7 @@ Glacier::StarterI::StarterI(const CommunicatorPtr& communicator, const PasswordV
{
assert(_verifier);
- _traceLevel = _properties->getPropertyAsInt("Glacier.Trace.Starter");
+ _traceLevel = _properties->getPropertyAsInt("Glacier.Starter.Trace");
// Set up the Certificate Generation context
string country = _properties->getPropertyWithDefault("Glacier.Starter.Certificate.Country", "US");
@@ -69,7 +69,7 @@ Glacier::StarterI::destroy()
_properties = 0;
}
-RouterPrx
+Glacier::RouterPrx
Glacier::StarterI::startRouter(const string& userId, const string& password, ByteSeq& privateKey, ByteSeq& publicKey,
ByteSeq& routerCert, const Current&)
{
@@ -118,7 +118,7 @@ Glacier::StarterI::startRouter(const string& userId, const string& password, Byt
//
// Start a router.
//
- string path = _properties->getPropertyWithDefault("Glacier.Starter.RouterPath", "glacier");
+ string path = _properties->getPropertyWithDefault("Glacier.Starter.RouterPath", "glacierrouter");
string uuid = IceUtil::generateUUID();
pid_t pid;
int fds[2];
@@ -178,6 +178,14 @@ Glacier::StarterI::startRouter(const string& userId, const string& password, Byt
args.push_back("--Ice.SSL.Client.Overrides.RSA.PrivateKey=" + routerPrivateKeyBase64);
args.push_back("--Ice.SSL.Client.Overrides.RSA.Certificate=" + routerCertificateBase64);
args.push_back("--Glacier.Router.AcceptCert=" + clientCertificateBase64);
+ args.push_back("--Glacier.Router.UserId=" + userId);
+
+ if (!_properties->getProperty("Glacier.Starter.AddUserToAllowCategories").empty())
+ {
+ args.push_back("--Glacier.Router.AllowCategories=" +
+ _properties->getProperty("Glacier.Router.AllowCategories") + string(" ") + userId);
+ }
+
ostringstream s;
s << "--Glacier.Router.PrintProxyOnFd=" << fds[1];
args.push_back(s.str());
diff --git a/cpp/src/Glacier/GlacierI.h b/cpp/src/Glacier/StarterI.h
index 2343e0b146d..6a5a1aa07bc 100644
--- a/cpp/src/Glacier/GlacierI.h
+++ b/cpp/src/Glacier/StarterI.h
@@ -13,7 +13,7 @@
#include <Ice/Ice.h>
#include <Ice/RSACertificateGen.h>
-#include <Glacier/Glacier.h>
+#include <Glacier/Starter.h>
namespace Glacier
{
@@ -29,12 +29,12 @@ public:
void destroy();
- Ice::RouterPrx startRouter(const std::string&,
- const std::string&,
- Ice::ByteSeq&,
- Ice::ByteSeq&,
- Ice::ByteSeq&,
- const Ice::Current&);
+ RouterPrx startRouter(const std::string&,
+ const std::string&,
+ Ice::ByteSeq&,
+ Ice::ByteSeq&,
+ Ice::ByteSeq&,
+ const Ice::Current&);
private: