Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# TAO_ECG_Reconnect_ConsumerEC_Control Class Reference

Consumer event channel control. More...

`#include <ECG_Reconnect_ConsumerEC_Control.h>`

Inheritance diagram for TAO_ECG_Reconnect_ConsumerEC_Control:

[legend]
Collaboration diagram for TAO_ECG_Reconnect_ConsumerEC_Control:

[legend]
List of all members.

## Public Methods
| 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.
void | handle_timeout (const ACE_Time_Value &tv, const void *arg)
| Receive the timeout from the adapter.
virtual int | activate (void)
virtual int | shutdown (void)
virtual void | event_channel_not_exist (TAO_EC_Gateway_IIOP *gateway ACE_ENV_ARG_DECL_NOT_USED)
virtual void | system_exception (TAO_EC_Gateway_IIOP *gateway, CORBA::SystemException &ACE_ENV_ARG_DECL_NOT_USED)
## Private Methods
void | query_eventchannel (ACE_ENV_SINGLE_ARG_DECL)
void | try_reconnect (ACE_ENV_SINGLE_ARG_DECL)
| Look if we can reconnect again.
void | reconnect (ACE_ENV_SINGLE_ARG_DECL)
| Reconnect to the consumer ec.
## Private Attributes
ACE_Time_Value | rate_
| The polling rate.
ACE_Time_Value | timeout_
| The polling timeout.
TAO_ECG_Reconnect_ConsumerEC_Control_Adapter | adapter_
| The Adapter for the reactor events.
TAO_EC_Gateway_IIOP * | gateway_
| The gateway.
CORBA::ORB_var | orb_
| The ORB.
CORBA::PolicyCurrent_var | policy_current_
| To control the timeout policy in the thread.
CORBA::PolicyList | policy_list_
| Precomputed policy list to the set timeout.
ACE_Reactor * | reactor_
| The ORB reactor.
int | is_consumer_ec_connected_
| Do we have a connection to the consumer ec.

## Detailed Description

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.

## Constructor & Destructor Documentation

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.

TAO_ECG_Reconnect_ConsumerEC_Control::~TAO_ECG_Reconnect_ConsumerEC_Control | ( | void |  | ) | `[virtual]`

| Destructor.

## Member Function Documentation

int TAO_ECG_Reconnect_ConsumerEC_Control::activate | ( | void |  | ) | `[virtual]`

| Activate any internal threads or timers used to poll the state of the event channel. Reimplemented from TAO_ECG_ConsumerEC_Control.

void TAO_ECG_Reconnect_ConsumerEC_Control::event_channel_not_exist | ( | TAO_EC_Gateway_IIOP *gateway | ACE_ENV_ARG_DECL_NOT_USED | ) | `[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.

void TAO_ECG_Reconnect_ConsumerEC_Control::query_eventchannel | ( | ACE_ENV_SINGLE_ARG_DECL |  | ) | `[private]`

| Check if the consumers still exists. It is a helper method for handle_timeout() to isolate the exceptions.

void TAO_ECG_Reconnect_ConsumerEC_Control::reconnect | ( | ACE_ENV_SINGLE_ARG_DECL |  | ) | `[private]`

| Reconnect to the consumer ec.

int TAO_ECG_Reconnect_ConsumerEC_Control::shutdown | ( | void |  | ) | `[virtual]`

| Shutdown any internal threads or timers used to poll the state of the event channel. Reimplemented from TAO_ECG_ConsumerEC_Control.

void TAO_ECG_Reconnect_ConsumerEC_Control::system_exception | ( | TAO_EC_Gateway_IIOP * | gateway,
|  | CORBA::SystemException & | ACE_ENV_ARG_DECL_NOT_USED
| ) | `[virtual]`

| Some system exception was raised while trying to contact the event channel Reimplemented from TAO_ECG_ConsumerEC_Control.

void TAO_ECG_Reconnect_ConsumerEC_Control::try_reconnect | ( | ACE_ENV_SINGLE_ARG_DECL |  | ) | `[private]`

| Look if we can reconnect again.

## Member Data Documentation

TAO_ECG_Reconnect_ConsumerEC_Control_Adapter TAO_ECG_Reconnect_ConsumerEC_Control::adapter_`[private]`

| The Adapter for the reactor events.

TAO_EC_Gateway_IIOP* TAO_ECG_Reconnect_ConsumerEC_Control::gateway_`[private]`

| The gateway.

int TAO_ECG_Reconnect_ConsumerEC_Control::is_consumer_ec_connected_`[private]`

| Do we have a connection to the consumer ec.

CORBA::ORB_var TAO_ECG_Reconnect_ConsumerEC_Control::orb_`[private]`

| The ORB.

CORBA::PolicyCurrent_var TAO_ECG_Reconnect_ConsumerEC_Control::policy_current_`[private]`

| To control the timeout policy in the thread.

CORBA::PolicyList TAO_ECG_Reconnect_ConsumerEC_Control::policy_list_`[private]`

| Precomputed policy list to the set timeout.

ACE_Time_Value TAO_ECG_Reconnect_ConsumerEC_Control::rate_`[private]`

| The polling rate.

ACE_Reactor* TAO_ECG_Reconnect_ConsumerEC_Control::reactor_`[private]`

| The ORB reactor.

ACE_Time_Value TAO_ECG_Reconnect_ConsumerEC_Control::timeout_`[private]`

| The polling timeout.

The documentation for this class was generated from the following files:

- ECG_Reconnect_ConsumerEC_Control.h
- ECG_Reconnect_ConsumerEC_Control.cpp