summaryrefslogtreecommitdiff
path: root/cpp/src/IceStorm/Subscriber.h
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2006-11-16 06:44:20 +0000
committerMatthew Newhook <matthew@zeroc.com>2006-11-16 06:44:20 +0000
commit1cf08b7d8947437614e65619e17f9853898a7f85 (patch)
treeb80eef7a29df082b7a90ae8e02c85fabb6e58012 /cpp/src/IceStorm/Subscriber.h
parentRemove debug statements (diff)
downloadice-1cf08b7d8947437614e65619e17f9853898a7f85.tar.bz2
ice-1cf08b7d8947437614e65619e17f9853898a7f85.tar.xz
ice-1cf08b7d8947437614e65619e17f9853898a7f85.zip
Removed upstream pinging from IceStorm.
Diffstat (limited to 'cpp/src/IceStorm/Subscriber.h')
-rw-r--r--cpp/src/IceStorm/Subscriber.h32
1 files changed, 11 insertions, 21 deletions
diff --git a/cpp/src/IceStorm/Subscriber.h b/cpp/src/IceStorm/Subscriber.h
index ac1fb7bbb19..580bef03cbb 100644
--- a/cpp/src/IceStorm/Subscriber.h
+++ b/cpp/src/IceStorm/Subscriber.h
@@ -31,7 +31,6 @@ public:
~Subscriber();
- void reachable();
Ice::ObjectPrx proxy() const;
Ice::Identity id() const;
bool persistent() const;
@@ -56,8 +55,7 @@ public:
void flushTime(const IceUtil::Time&);
IceUtil::Time pollMaxFlushTime(const IceUtil::Time&);
- void setError(const Ice::Exception&);
- void setUnreachable(const Ice::Exception&);
+ void error(const Ice::Exception&);
protected:
@@ -71,26 +69,15 @@ protected:
IceUtil::Mutex _mutex;
- enum State
+ enum SubscriberState
{
- //
- // The Subscriber is active.
- //
- StateActive,
- //
- // The Subscriber encountered an error during event
- // transmission.
- //
- StateError,
- //
- // The Subscriber is no longer reachable.
- //
- StateUnreachable
+ SubscriberStateOnline,
+ SubscriberStateFlushPending,
+ SubscriberStateOffline,
+ SubscriberStateError
};
- State _state;
-
- bool _busy;
- EventSeq _events;
+ SubscriberState _state; // The subscriber state.
+ EventSeq _events; // The queue of events to send.
//
// Not protected by _mutex. These members are protected by the
@@ -101,6 +88,9 @@ protected:
};
bool operator==(const IceStorm::SubscriberPtr&, const Ice::Identity&);
+bool operator==(const IceStorm::Subscriber&, const IceStorm::Subscriber&);
+bool operator!=(const IceStorm::Subscriber&, const IceStorm::Subscriber&);
+bool operator<(const IceStorm::Subscriber&, const IceStorm::Subscriber&);
}