diff options
author | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-11-12 18:49:19 +0000 |
---|---|---|
committer | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-11-12 18:49:19 +0000 |
commit | 2bf202d5d14b50d78f0a763086a0c6c8250542a8 (patch) | |
tree | 0cc3c26b5c6f6833ce11a7212d9165f1205f22d9 /TAO/tao/LF_Invocation_Event.h | |
parent | 0d8e4ec1c7da4b9a15175090826dbfb953de2bd4 (diff) | |
download | ATCD-2bf202d5d14b50d78f0a763086a0c6c8250542a8.tar.gz |
ChangeLogTag: Tue Nov 12 12:47:31 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/LF_Invocation_Event.h')
-rw-r--r-- | TAO/tao/LF_Invocation_Event.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/TAO/tao/LF_Invocation_Event.h b/TAO/tao/LF_Invocation_Event.h new file mode 100644 index 00000000000..b85da5e31f0 --- /dev/null +++ b/TAO/tao/LF_Invocation_Event.h @@ -0,0 +1,84 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file LF_Invocation_Event.h + * + * $Id$ + * + * @author Carlos O'Ryan <coryan@uci.edu> + */ +//============================================================================= + +#ifndef TAO_LF_INVOCATION_EVENT_H +#define TAO_LF_INVOCATION_EVENT_H +#include "ace/pre.h" + +#include "LF_Event.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +/** + * @class TAO_LF_Invocation_Event + * + * @brief Use the Leader/Follower loop to wait for one specific event + * in the invocation path. + * + * Concrete event types and manipulation class through which the + * invocation data path would flow. Typically state changes of + * interest include whether a message has arrived, or timedout waiting + * for a message or if the cionnection is closed waiting for a + * message. Details of the states are documented within the class. + * + */ +class TAO_Export TAO_LF_Invocation_Event: public TAO_LF_Event +{ +public: + /// Constructor + TAO_LF_Invocation_Event (void); + + /// Destructor + virtual ~TAO_LF_Invocation_Event (void); + + /// Return 1 if the condition was satisfied successfully, 0 if it + /// has not + int successful (void) const; + + /// Return 1 if an error was detected while waiting for the + /// event + int error_detected (void) const; + //@} + +protected: + + /// Validate and perform the state change + /* + * This concrete class uses the following states declared in the + * class TAO_LF_Event + * + * LFS_IDLE - The event is created, and is in initial state. + * LFS_ACTIVE - The event is active and it can transition to any of + * the following states, all the states are final. + * LFS_SUCCESS - The event has completed successfully. + * LFS_FAILURE - A failure has been detected while the event was + * active. + * LFS_TIMEOUT - The event has timed out. + * LFS_CONNECTION_CLOSED - The connection was closed when the state + * was active. + * + */ + virtual void state_changed_i (int new_state); + +private: + /// Check whether we have reached the final state.. + int is_state_final (void); +}; + +#if defined (__ACE_INLINE__) +# include "LF_Invocation_Event.inl" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /* TAO_LF_INVOCATION_EVENT_H */ |