summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service/LiveCheck.h')
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/LiveCheck.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h
index da5195b9e79..005ae3a3005 100644
--- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h
+++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h
@@ -26,6 +26,7 @@
#include "tao/Intrusive_Ref_Count_Handle_T.h"
class LiveCheck;
+class LiveEntry;
//---------------------------------------------------------------------------
/*
@@ -34,9 +35,11 @@ class LiveCheck;
* @brief indication of the known condition of a target server
*
* LS_UNKNOWN - The server hasn't yet been pinged
+ * LS_PING_AWAY - A ping request has been issued, waiting for reply
* LS_DEAD - The ping failed for reasons other than POA Activation
* LS_ALIVE - The server positively acknowledged a ping
* LS_TRANSIENT - The server connected, but acively raised a transient
+ * LS_LAST_TRANSIENT - The maximum number of retries is reached
* LS_TIMEDOUT - The server connected, but never returned any result.
*/
enum LiveStatus {
@@ -71,6 +74,12 @@ class Locator_Export LiveListener
virtual ~LiveListener (void);
+ /// sets the initial status volue, set by entry during an add_listener call
+ void entry (const LiveEntry *entry);
+
+ /// Query the status of the associated entry
+ LiveStatus status (void) const;
+
/// called by the asynch ping receiver when a reply or an exception
/// is received. Returns true if finished listening
virtual bool status_changed (LiveStatus status) = 0;
@@ -81,9 +90,11 @@ class Locator_Export LiveListener
LiveListener *_add_ref (void);
void _remove_ref (void);
- private:
+ protected:
ACE_CString server_;
+ const LiveEntry *entry_;
+ private:
int refcount_;
TAO_SYNCH_MUTEX lock_;
};
@@ -115,6 +126,9 @@ class Locator_Export LiveEntry
void status (LiveStatus l);
void reset_status (void);
+ /// the current state value as text
+ static const char *status_name (LiveStatus s);
+
void update_listeners (void);
bool validate_ping (bool &want_reping, ACE_Time_Value &next);
void do_ping (PortableServer::POA_ptr poa);