summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2006-11-15 13:31:33 +0000
committerMatthew Newhook <matthew@zeroc.com>2006-11-15 13:31:33 +0000
commit709152f1ce6f82cbadfaea5e8fdbd22be6f8fd4c (patch)
treea09c44e0aa4263fe90a26bed3049551b9cf66363 /cpp
parentAdded NullPermissionsVerifiers to Glacier2 (diff)
downloadice-709152f1ce6f82cbadfaea5e8fdbd22be6f8fd4c.tar.bz2
ice-709152f1ce6f82cbadfaea5e8fdbd22be6f8fd4c.tar.xz
ice-709152f1ce6f82cbadfaea5e8fdbd22be6f8fd4c.zip
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1547. Demo cleanup.
Diffstat (limited to 'cpp')
-rw-r--r--cpp/demo/IceStorm/clock/.depend7
-rw-r--r--cpp/demo/IceStorm/clock/Clock.ice2
-rw-r--r--cpp/demo/IceStorm/clock/ClockI.cpp20
-rw-r--r--cpp/demo/IceStorm/clock/ClockI.h22
-rw-r--r--cpp/demo/IceStorm/clock/Makefile3
-rw-r--r--cpp/demo/IceStorm/clock/Makefile.mak3
-rw-r--r--cpp/demo/IceStorm/clock/Publisher.cpp52
-rw-r--r--cpp/demo/IceStorm/clock/README5
-rw-r--r--cpp/demo/IceStorm/clock/Subscriber.cpp121
9 files changed, 86 insertions, 149 deletions
diff --git a/cpp/demo/IceStorm/clock/.depend b/cpp/demo/IceStorm/clock/.depend
index ca10a7e5600..7a84acdef0d 100644
--- a/cpp/demo/IceStorm/clock/.depend
+++ b/cpp/demo/IceStorm/clock/.depend
@@ -1,6 +1,5 @@
-Clock$(OBJEXT): Clock.cpp Clock.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/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/Object.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/Ice/StringConverter.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/LocalException.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/ObjectFactory.h ../../../include/IceUtil/Iterator.h ../../../include/IceUtil/ScopedArray.h
-Publisher$(OBJEXT): Publisher.cpp ../../../include/Ice/Application.h ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ImplicitContextF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/ImplicitContext.h ../../../include/IceStorm/IceStorm.h ../../../include/Ice/SliceChecksumDict.h Clock.h
-Subscriber$(OBJEXT): Subscriber.cpp ../../../include/Ice/Application.h ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ImplicitContextF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/ImplicitContext.h ../../../include/IceStorm/IceStorm.h ../../../include/Ice/SliceChecksumDict.h ../../../include/IceUtil/UUID.h ClockI.h Clock.h
-ClockI$(OBJEXT): ClockI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ImplicitContextF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/ImplicitContext.h ClockI.h Clock.h
+Clock$(OBJEXT): Clock.cpp Clock.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/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/Object.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/Ice/StringConverter.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/LocalException.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/ObjectFactory.h ../../../include/IceUtil/Iterator.h ../../../include/IceUtil/ScopedArray.h
+Publisher$(OBJEXT): Publisher.cpp ../../../include/Ice/Application.h ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ImplicitContextF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/ImplicitContext.h ../../../include/IceStorm/IceStorm.h ../../../include/Ice/SliceChecksumDict.h Clock.h
+Subscriber$(OBJEXT): Subscriber.cpp ../../../include/Ice/Application.h ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCCountMap.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/StringConverter.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ImplicitContextF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/Process.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Ice/ImplicitContext.h ../../../include/IceStorm/IceStorm.h ../../../include/Ice/SliceChecksumDict.h Clock.h
Clock.cpp: Clock.ice
Clock.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
diff --git a/cpp/demo/IceStorm/clock/Clock.ice b/cpp/demo/IceStorm/clock/Clock.ice
index b0c35004eab..c698cb7dd99 100644
--- a/cpp/demo/IceStorm/clock/Clock.ice
+++ b/cpp/demo/IceStorm/clock/Clock.ice
@@ -15,7 +15,7 @@ module Demo
interface Clock
{
- void tick();
+ void tick(string time);
};
};
diff --git a/cpp/demo/IceStorm/clock/ClockI.cpp b/cpp/demo/IceStorm/clock/ClockI.cpp
deleted file mode 100644
index 2d57df4c870..00000000000
--- a/cpp/demo/IceStorm/clock/ClockI.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#include <Ice/Ice.h>
-
-#include <ClockI.h>
-
-using namespace std;
-
-void
-ClockI::tick(const Ice::Current&)
-{
- cout << "tick" << endl;
-}
diff --git a/cpp/demo/IceStorm/clock/ClockI.h b/cpp/demo/IceStorm/clock/ClockI.h
deleted file mode 100644
index c926a02b427..00000000000
--- a/cpp/demo/IceStorm/clock/ClockI.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#ifndef CLOCK_I_H
-#define CLOCK_I_H
-
-#include <Clock.h>
-
-class ClockI : public Demo::Clock
-{
-public:
-
- virtual void tick(const Ice::Current&);
-};
-
-#endif
diff --git a/cpp/demo/IceStorm/clock/Makefile b/cpp/demo/IceStorm/clock/Makefile
index 31bf043079b..7292adbff39 100644
--- a/cpp/demo/IceStorm/clock/Makefile
+++ b/cpp/demo/IceStorm/clock/Makefile
@@ -18,8 +18,7 @@ OBJS = Clock.o
POBJS = Publisher.o
-SOBJS = Subscriber.o \
- ClockI.o
+SOBJS = Subscriber.o
SRCS = $(OBJS:.o=.cpp) \
$(POBJS:.o=.cpp) \
diff --git a/cpp/demo/IceStorm/clock/Makefile.mak b/cpp/demo/IceStorm/clock/Makefile.mak
index 84d3099efe1..aa158cba901 100644
--- a/cpp/demo/IceStorm/clock/Makefile.mak
+++ b/cpp/demo/IceStorm/clock/Makefile.mak
@@ -18,8 +18,7 @@ OBJS = Clock.obj
POBJS = Publisher.obj
-SOBJS = Subscriber.obj \
- ClockI.obj
+SOBJS = Subscriber.obj
SRCS = $(OBJS:.obj=.cpp) \
$(POBJS:.obj=.cpp) \
diff --git a/cpp/demo/IceStorm/clock/Publisher.cpp b/cpp/demo/IceStorm/clock/Publisher.cpp
index 527a180f899..5e7d96a77eb 100644
--- a/cpp/demo/IceStorm/clock/Publisher.cpp
+++ b/cpp/demo/IceStorm/clock/Publisher.cpp
@@ -42,45 +42,63 @@ Publisher::run(int argc, char* argv[])
return EXIT_FAILURE;
}
- Ice::ObjectPrx base = communicator()->stringToProxy(proxy);
- IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::checkedCast(base);
+ IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::checkedCast(
+ communicator()->stringToProxy(proxy));
if(!manager)
{
cerr << appName() << ": invalid proxy" << endl;
return EXIT_FAILURE;
}
+ string topicName = "time";
+ if(argc != 1)
+ {
+ topicName = argv[1];
+ }
+
//
// Retrieve the topic named "time".
//
IceStorm::TopicPrx topic;
try
{
- topic = manager->retrieve("time");
+ topic = manager->retrieve(topicName);
}
catch(const IceStorm::NoSuchTopic& e)
{
- cerr << appName() << ": " << e << " name: " << e.name << endl;
- return EXIT_FAILURE;
+ try
+ {
+ topic = manager->create(topicName);
+ }
+ catch(const IceStorm::TopicExists& e)
+ {
+ cerr << appName() << ": temporary failure. try again." << endl;
+ return EXIT_FAILURE;
+ }
}
- assert(topic);
//
- // Get the topic's publisher object, verify that it supports
- // the Clock type, and create a oneway Clock proxy (for efficiency
- // reasons).
+ // Get the topic's publisher object, the Clock type, and create a
+ // oneway Clock proxy (for efficiency reasons).
//
- Ice::ObjectPrx obj = topic->getPublisher();
- if(!obj->ice_isDatagram())
+ ClockPrx clock = ClockPrx::uncheckedCast(topic->getPublisher()->ice_oneway());
+
+ cout << "publishing tick events. Press ^C to terminate the application." << endl;
+ try
{
- obj = obj->ice_oneway();
+ while(true)
+ {
+ clock->tick(IceUtil::Time::now().toString());
+#ifdef WIN32
+ Sleep(1000);
+#else
+ sleep(1);
+#endif
+ }
}
- ClockPrx clock = ClockPrx::uncheckedCast(obj);
-
- cout << "publishing 10 tick events" << endl;
- for(int i = 0; i < 10; ++i)
+ catch(const Ice::CommunicatorDestroyedException&)
{
- clock->tick();
+ // Ignore
}
return EXIT_SUCCESS;
diff --git a/cpp/demo/IceStorm/clock/README b/cpp/demo/IceStorm/clock/README
index 79b88c5d2ee..53705ff60fa 100644
--- a/cpp/demo/IceStorm/clock/README
+++ b/cpp/demo/IceStorm/clock/README
@@ -9,12 +9,11 @@ current working directory.
In a separate window:
-$ icestormadmin --Ice.Config=config.service -e "create time"
$ subscriber
In another window:
$ publisher
-Ten "tick" messages should be displayed in the subscriber window for
-each run of the publisher.
+While the publisher continues to run "tick" messages should be
+displayed in the subscriber window.
diff --git a/cpp/demo/IceStorm/clock/Subscriber.cpp b/cpp/demo/IceStorm/clock/Subscriber.cpp
index a75bc7563a4..788eb485e22 100644
--- a/cpp/demo/IceStorm/clock/Subscriber.cpp
+++ b/cpp/demo/IceStorm/clock/Subscriber.cpp
@@ -9,15 +9,25 @@
#include <Ice/Application.h>
#include <IceStorm/IceStorm.h>
-#include <IceUtil/UUID.h>
-#include <ClockI.h>
+#include <Clock.h>
#include <map>
using namespace std;
using namespace Demo;
+class ClockI : public Clock
+{
+public:
+
+ virtual void
+ tick(const string& time, const Ice::Current&)
+ {
+ cout << time << endl;
+ }
+};
+
class Subscriber : public Ice::Application
{
public:
@@ -45,106 +55,61 @@ Subscriber::run(int argc, char* argv[])
return EXIT_FAILURE;
}
- Ice::ObjectPrx base = communicator()->stringToProxy(proxy);
- IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::checkedCast(base);
+ IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::checkedCast(
+ communicator()->stringToProxy(proxy));
if(!manager)
{
cerr << appName() << ": invalid proxy" << endl;
return EXIT_FAILURE;
}
- //
- // Gather the set of topics to which to subscribe. It is either
- // the set provided on the command line, or the topic "time".
- //
- Ice::StringSeq topics;
- if(argc > 1)
+ string topicName = "time";
+ if(argc != 1)
{
- for(int i = 1; i < argc; ++i)
- {
- topics.push_back(argv[i]);
- }
+ topicName = argv[1];
}
- else
+
+ IceStorm::TopicPrx topic;
+ try
{
- topics.push_back("time");
+ topic = manager->retrieve(topicName);
}
-
- //
- // Set the requested quality of service "reliability" =
- // "batch". This tells IceStorm to send events to the subscriber
- // in batches at regular intervals.
- //
- IceStorm::QoS qos;
- //qos["reliability"] = "batch";
-
- //
- // Create the servant to receive the events.
- //
- Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Clock.Subscriber");
- Ice::ObjectPtr clock = new ClockI();
-
- //
- // List of all subscribers.
- //
- map<string, Ice::ObjectPrx> subscribers;
-
- //
- // Add the servant to the adapter for each topic. A ServantLocator
- // could have been used for the same purpose.
- //
- for(Ice::StringSeq::iterator p = topics.begin(); p != topics.end(); ++p)
+ catch(const IceStorm::NoSuchTopic& e)
{
- //
- // Add a Servant for the Ice Object.
- //
- Ice::ObjectPrx object = adapter->addWithUUID(clock);
try
{
- IceStorm::TopicPrx topic = manager->retrieve(*p);
- topic->subscribe(qos, object);
+ topic = manager->create(topicName);
}
- catch(const IceStorm::NoSuchTopic& e)
+ catch(const IceStorm::TopicExists& e)
{
- cerr << appName() << ": " << e << " name: " << e.name << endl;
- break;
+ cerr << appName() << ": temporary failure. try again." << endl;
+ return EXIT_FAILURE;
}
-
- //
- // Add to the set of subscribers _after_ subscribing. This
- // ensures that only subscribed subscribers are unsubscribed
- // in the case of an error.
- //
- subscribers[*p] = object;
}
+ Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Clock.Subscriber");
+
//
- // Unless there is a subscriber per topic then there was some
- // problem. If there was an error the application should terminate
- // without accepting any events.
+ // Add a Servant for the Ice Object.
//
- if(subscribers.size() == topics.size())
- {
- adapter->activate();
- shutdownOnInterrupt();
- communicator()->waitForShutdown();
- }
+ Ice::ObjectPrx subscriber = adapter->addWithUUID(new ClockI);
+
+ //
+ // This demo requires no quality of service, so it will use
+ // the defaults.
+ //
+ IceStorm::QoS qos;
+
+ topic->subscribe(qos, subscriber);
+ adapter->activate();
+
+ shutdownOnInterrupt();
+ communicator()->waitForShutdown();
//
// Unsubscribe all subscribed objects.
//
- for(map<string,Ice::ObjectPrx>::const_iterator q = subscribers.begin(); q != subscribers.end(); ++q)
- {
- try
- {
- IceStorm::TopicPrx topic = manager->retrieve(q->first);
- topic->unsubscribe(q->second);
- }
- catch(const IceStorm::NoSuchTopic& e)
- {
- cerr << appName() << ": " << e << " name: " << e.name << endl;
- }
- }
+ topic->unsubscribe(subscriber);
return EXIT_SUCCESS;
}