summaryrefslogtreecommitdiff
path: root/cpp/src/IceStorm/Subscriber.h
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2006-09-12 07:58:22 +0000
committerMatthew Newhook <matthew@zeroc.com>2006-09-12 07:58:22 +0000
commit6931fe4cffab481f1d2b9b6941d5504abe683505 (patch)
tree6c74d55705991e96604e5df94a45232a114cf6f0 /cpp/src/IceStorm/Subscriber.h
parenthttp://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1289 (diff)
downloadice-6931fe4cffab481f1d2b9b6941d5504abe683505.tar.bz2
ice-6931fe4cffab481f1d2b9b6941d5504abe683505.tar.xz
ice-6931fe4cffab481f1d2b9b6941d5504abe683505.zip
IceStormPerSubscriberPublisher
Diffstat (limited to 'cpp/src/IceStorm/Subscriber.h')
-rw-r--r--cpp/src/IceStorm/Subscriber.h39
1 files changed, 21 insertions, 18 deletions
diff --git a/cpp/src/IceStorm/Subscriber.h b/cpp/src/IceStorm/Subscriber.h
index 610feac9457..da4c78bfcf1 100644
--- a/cpp/src/IceStorm/Subscriber.h
+++ b/cpp/src/IceStorm/Subscriber.h
@@ -10,11 +10,10 @@
#ifndef SUBSCRIBER_H
#define SUBSCRIBER_H
-#include <IceUtil/Mutex.h>
+#include <IceUtil/Handle.h>
+#include <IceUtil/Shared.h>
+#include <Ice/CommunicatorF.h>
#include <Ice/Identity.h>
-#include <IceStorm/Event.h>
-
-#include <vector>
namespace IceStorm
{
@@ -25,6 +24,15 @@ namespace IceStorm
class TraceLevels;
typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr;
+class SubscriberFactory;
+typedef IceUtil::Handle<SubscriberFactory> SubscriberFactoryPtr;
+
+class Event;
+typedef IceUtil::Handle<Event> EventPtr;
+
+class QueuedProxy;
+typedef IceUtil::Handle<QueuedProxy> QueuedProxyPtr;
+
//
// Subscriber interface.
//
@@ -32,7 +40,8 @@ class Subscriber : public virtual IceUtil::Shared
{
public:
- Subscriber(const TraceLevelsPtr& traceLevels, const Ice::Identity&);
+ Subscriber(const SubscriberFactoryPtr&, const Ice::CommunicatorPtr&,
+ const TraceLevelsPtr&, const QueuedProxyPtr&);
~Subscriber();
virtual bool persistent() const = 0;
@@ -57,17 +66,17 @@ public:
// Activate. Called after any other subscribers with the same
// identity have been deactivated.
//
- virtual void activate() = 0;
+ virtual void activate();
//
// Unsubscribe. Mark the state as Unsubscribed.
//
- virtual void unsubscribe() = 0;
+ virtual void unsubscribe();
//
// Unsubscribe. Mark the state as Replaced.
//
- virtual void replace() = 0;
+ virtual void replace();
//
// Publish the given event. Mark the state as Error in the event of
@@ -78,7 +87,10 @@ public:
protected:
// Immutable
- TraceLevelsPtr _traceLevels;
+ const SubscriberFactoryPtr _factory;
+ const std::string _desc;
+ const TraceLevelsPtr _traceLevels;
+ const QueuedProxyPtr _obj;
//
// Subscriber state.
@@ -106,15 +118,6 @@ protected:
IceUtil::Mutex _stateMutex;
State _state;
-
-private:
-
- //
- // This id is the full id of the subscriber for a particular topic.
- //
- // Immutable.
- //
- Ice::Identity _id;
};
typedef IceUtil::Handle<Subscriber> SubscriberPtr;