#include <LF_Invocation_Event.h>
Inheritance diagram for TAO_LF_Invocation_Event:
Public Member Functions | |
TAO_LF_Invocation_Event (void) | |
Constructor. | |
virtual | ~TAO_LF_Invocation_Event (void) |
Destructor. | |
int | successful (void) const |
int | error_detected (void) const |
Protected Member Functions | |
virtual void | state_changed_i (int new_state) |
Validate and perform the state change. | |
Private Member Functions | |
int | is_state_final (void) |
Check whether we have reached the final state.. |
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.
Definition at line 39 of file LF_Invocation_Event.h.
|
Constructor.
|
|
Destructor.
Definition at line 15 of file LF_Invocation_Event.cpp.
00016 { 00017 } |
|
Return 1 if an error was detected while waiting for the event Implements TAO_LF_Event. Definition at line 75 of file LF_Invocation_Event.cpp. Referenced by TAO_Wait_On_Read::wait(), and TAO_Wait_On_Reactor::wait().
00076 { 00077 return (this->state_ == TAO_LF_Event::LFS_FAILURE 00078 || this->state_ == TAO_LF_Event::LFS_TIMEOUT 00079 || this->state_ == TAO_LF_Event::LFS_CONNECTION_CLOSED); 00080 } |
|
Check whether we have reached the final state..
Implements TAO_LF_Event. Definition at line 83 of file LF_Invocation_Event.cpp.
00084 { 00085 if (this->state_ == TAO_LF_Event::LFS_TIMEOUT || 00086 this->state_ == TAO_LF_Event::LFS_FAILURE) 00087 return 1; 00088 00089 return 0; 00090 } |
|
Validate and perform the state change.
Implements TAO_LF_Event. Definition at line 20 of file LF_Invocation_Event.cpp. Referenced by TAO_Synch_Queued_Message::bytes_transferred(), TAO_Asynch_Queued_Message::bytes_transferred(), and TAO_Synch_Reply_Dispatcher::TAO_Synch_Reply_Dispatcher().
00021 { 00022 if (this->state_ == new_state) 00023 return; 00024 00025 // Validate the state change 00026 if (this->state_ == TAO_LF_Event::LFS_IDLE) 00027 { 00028 // From the LFS_IDLE state we can only become active. 00029 if (new_state == TAO_LF_Event::LFS_ACTIVE 00030 || new_state == TAO_LF_Event::LFS_CONNECTION_CLOSED) 00031 this->state_ = new_state; 00032 return; 00033 } 00034 else if (this->state_ == TAO_LF_Event::LFS_ACTIVE) 00035 { 00036 // From LFS_ACTIVE we can only move to a few states 00037 if (new_state != TAO_LF_Event::LFS_IDLE) 00038 { 00039 if (new_state == TAO_LF_Event::LFS_CONNECTION_CLOSED) 00040 { 00041 this->state_ = TAO_LF_Event::LFS_FAILURE; 00042 } 00043 else 00044 { 00045 this->state_ = new_state; 00046 } 00047 } 00048 return; 00049 } 00050 else if (this->state_ == TAO_LF_Event::LFS_SUCCESS 00051 || this->state_ == TAO_LF_Event::LFS_CONNECTION_CLOSED) 00052 { 00053 // From the two states above we can go back to ACTIVE, as when a 00054 // request is restarted. 00055 if (new_state == TAO_LF_Event::LFS_ACTIVE) 00056 { 00057 this->state_ = new_state; 00058 } 00059 return; 00060 } 00061 else/* if (this->state_ == TAO_LF_Event::LFS_TIMEOUT || FAILURE */ 00062 { 00063 // Other states are final.. 00064 } 00065 00066 } |
|
Return 1 if the condition was satisfied successfully, 0 if it has not Implements TAO_LF_Event. Definition at line 69 of file LF_Invocation_Event.cpp. Referenced by TAO_Wait_On_Read::wait(), and TAO_Wait_On_Reactor::wait().
00070 { 00071 return this->state_ == TAO_LF_Event::LFS_SUCCESS; 00072 } |