TAO_RTEvent
2.1.8
|
Consumer event channel control. More...
#include <ECG_Reconnect_ConsumerEC_Control.h>
Public Member Functions | |
TAO_ECG_Reconnect_ConsumerEC_Control (const ACE_Time_Value &rate, const ACE_Time_Value &timeout, TAO_EC_Gateway_IIOP *gateway, CORBA::ORB_ptr orb) | |
virtual | ~TAO_ECG_Reconnect_ConsumerEC_Control (void) |
Destructor. More... | |
void | handle_timeout (const ACE_Time_Value &tv, const void *arg) |
Receive the timeout from the adapter. More... | |
virtual int | activate (void) |
virtual int | shutdown (void) |
virtual void | event_channel_not_exist (TAO_EC_Gateway_IIOP *gateway) |
virtual void | system_exception (TAO_EC_Gateway_IIOP *gateway, CORBA::SystemException &) |
![]() | |
TAO_ECG_ConsumerEC_Control (void) | |
Constructor. More... | |
virtual | ~TAO_ECG_ConsumerEC_Control (void) |
Destructor. More... | |
Private Member Functions | |
void | query_eventchannel (void) |
void | try_reconnect (void) |
Look if we can reconnect again. More... | |
void | reconnect (void) |
Reconnect to the consumer ec. More... | |
Private Attributes | |
ACE_Time_Value | rate_ |
The polling rate. More... | |
ACE_Time_Value | timeout_ |
The polling timeout. More... | |
TAO_ECG_Reconnect_ConsumerEC_Control_Adapter | adapter_ |
The Adapter for the reactor events. More... | |
TAO_EC_Gateway_IIOP * | gateway_ |
The gateway. More... | |
CORBA::ORB_var | orb_ |
The ORB. More... | |
CORBA::PolicyCurrent_var | policy_current_ |
To control the timeout policy in the thread. More... | |
CORBA::PolicyList | policy_list_ |
Precomputed policy list to the set timeout. More... | |
ACE_Reactor * | reactor_ |
The ORB reactor. More... | |
int | is_consumer_ec_connected_ |
Do we have a connection to the consumer ec. More... | |
long | timer_id_ |
The timer id. More... | |
Consumer event channel control.
Defines the interface for the consumer event channel control strategy. This strategy handles misbehaving or failing consumer event channels.
This control tries to reconnect to the consumer ec incase of a connection loss and then does a reconnect when the connection is back again. When also a restart of the consumer ec must be handled correctly, then the consumer ec must use a persistent IOR.
TAO_ECG_Reconnect_ConsumerEC_Control::TAO_ECG_Reconnect_ConsumerEC_Control | ( | const ACE_Time_Value & | rate, |
const ACE_Time_Value & | timeout, | ||
TAO_EC_Gateway_IIOP * | gateway, | ||
CORBA::ORB_ptr | orb | ||
) |
Constructor. It does not assume ownership of the event_channel parameter.
|
virtual |
Destructor.
|
virtual |
Activate any internal threads or timers used to poll the state of the event channel.
Reimplemented from TAO_ECG_ConsumerEC_Control.
|
virtual |
When pushing an event to the event channel a CORBA::OBJECT_NOT_EXIST exception was raised. The only interpretation is that the object has been destroyed. The strategy has to (at the very least), reclaim all the resources attached to that object.
Reimplemented from TAO_ECG_ConsumerEC_Control.
void TAO_ECG_Reconnect_ConsumerEC_Control::handle_timeout | ( | const ACE_Time_Value & | tv, |
const void * | arg | ||
) |
Receive the timeout from the adapter.
|
private |
Check if the consumers still exists. It is a helper method for handle_timeout() to isolate the exceptions.
|
private |
Reconnect to the consumer ec.
|
virtual |
Shutdown any internal threads or timers used to poll the state of the event channel.
Reimplemented from TAO_ECG_ConsumerEC_Control.
|
virtual |
Some system exception was raised while trying to contact the event channel
Reimplemented from TAO_ECG_ConsumerEC_Control.
|
private |
Look if we can reconnect again.
|
private |
The Adapter for the reactor events.
|
private |
The gateway.
|
private |
Do we have a connection to the consumer ec.
|
private |
The ORB.
|
private |
To control the timeout policy in the thread.
|
private |
Precomputed policy list to the set timeout.
|
private |
The polling rate.
|
private |
The ORB reactor.
|
private |
The polling timeout.
|
private |
The timer id.