TAO_CosEvent  2.2.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TAO_CEC_Reactive_SupplierControl Class Reference

SupplierControl. More...

#include <CEC_Reactive_SupplierControl.h>

Inheritance diagram for TAO_CEC_Reactive_SupplierControl:
Inheritance graph
Collaboration diagram for TAO_CEC_Reactive_SupplierControl:
Collaboration graph

Public Member Functions

 TAO_CEC_Reactive_SupplierControl (const ACE_Time_Value &rate, const ACE_Time_Value &timeout, unsigned int retries, TAO_CEC_EventChannel *event_channel, CORBA::ORB_ptr orb)
 
virtual ~TAO_CEC_Reactive_SupplierControl (void)
 Constructor for the typed ec. 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 supplier_not_exist (TAO_CEC_ProxyPushConsumer *proxy)
 
virtual void supplier_not_exist (TAO_CEC_ProxyPullConsumer *proxy)
 
virtual void system_exception (TAO_CEC_ProxyPullConsumer *proxy, CORBA::SystemException &)
 Some system exception was rasied while trying to push an event. More...
 
virtual bool need_to_disconnect (PortableServer::ServantBase *proxy)
 
virtual void successful_transmission (PortableServer::ServantBase *proxy)
 Allow others to inform us when a send or receive was successful. More...
 
- Public Member Functions inherited from TAO_CEC_SupplierControl
 TAO_CEC_SupplierControl (void)
 
virtual ~TAO_CEC_SupplierControl (void)
 destructor... More...
 

Private Member Functions

void query_suppliers (void)
 

Private Attributes

ACE_Time_Value rate_
 The polling rate. More...
 
ACE_Time_Value timeout_
 The polling timeout. More...
 
unsigned int retries_
 The number of retries per proxy until it is disconnected. More...
 
TAO_CEC_SupplierControl_Adapter adapter_
 The Adapter for the reactor events. More...
 
TAO_CEC_EventChannelevent_channel_
 The event channel. More...
 
CORBA::ORB_var orb_
 The typed event channel. 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_Reactorreactor_
 The ORB reactor. More...
 
long timer_id_
 The timer id. More...
 

Detailed Description

SupplierControl.

Defines the interface for the supplier control strategy. This strategy handles misbehaving or failing suppliers. = MEMORY MANAGMENT = LOCKING = TODO

Constructor & Destructor Documentation

TAO_CEC_Reactive_SupplierControl::TAO_CEC_Reactive_SupplierControl ( const ACE_Time_Value rate,
const ACE_Time_Value timeout,
unsigned int  retries,
TAO_CEC_EventChannel event_channel,
CORBA::ORB_ptr  orb 
)

Constructor. It does not assume ownership of the <event_channel> parameter.

TAO_CEC_Reactive_SupplierControl::~TAO_CEC_Reactive_SupplierControl ( void  )
virtual

Constructor for the typed ec.

destructor...

Member Function Documentation

int TAO_CEC_Reactive_SupplierControl::activate ( void  )
virtual

Activate any internal threads or timers used to poll the state of the suppliers

Reimplemented from TAO_CEC_SupplierControl.

void TAO_CEC_Reactive_SupplierControl::handle_timeout ( const ACE_Time_Value tv,
const void *  arg 
)

Receive the timeout from the adapter.

bool TAO_CEC_Reactive_SupplierControl::need_to_disconnect ( PortableServer::ServantBase proxy)
virtual

Do we need to disconnect this supplier? The parameter type for proxy is PortableServer::ServantBase* due to the fact that this method will be used for TAO_CEC_ProxyPushSupplier's and TAO_CEC_ProxyPullSupplier's.

Reimplemented from TAO_CEC_SupplierControl.

void TAO_CEC_Reactive_SupplierControl::query_suppliers ( void  )
private

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

int TAO_CEC_Reactive_SupplierControl::shutdown ( void  )
virtual

Reimplemented from TAO_CEC_SupplierControl.

void TAO_CEC_Reactive_SupplierControl::successful_transmission ( PortableServer::ServantBase proxy)
virtual

Allow others to inform us when a send or receive was successful.

Reimplemented from TAO_CEC_SupplierControl.

void TAO_CEC_Reactive_SupplierControl::supplier_not_exist ( TAO_CEC_ProxyPushConsumer proxy)
virtual

Invoked by helper classes when they detect that a supplier does not exists (i.e. _non_existent() returns true and/or the CORBA::OBJECT_NOT_EXIST exception has been raised).

Reimplemented from TAO_CEC_SupplierControl.

void TAO_CEC_Reactive_SupplierControl::supplier_not_exist ( TAO_CEC_ProxyPullConsumer proxy)
virtual

Invoked by helper classes when they detect that a supplier does not exists (i.e. _non_existent() returns true and/or the CORBA::OBJECT_NOT_EXIST exception has been raised).

Reimplemented from TAO_CEC_SupplierControl.

void TAO_CEC_Reactive_SupplierControl::system_exception ( TAO_CEC_ProxyPullConsumer proxy,
CORBA::SystemException  
)
virtual

Some system exception was rasied while trying to push an event.

Reimplemented from TAO_CEC_SupplierControl.

Member Data Documentation

TAO_CEC_SupplierControl_Adapter TAO_CEC_Reactive_SupplierControl::adapter_
private

The Adapter for the reactor events.

TAO_CEC_EventChannel* TAO_CEC_Reactive_SupplierControl::event_channel_
private

The event channel.

CORBA::ORB_var TAO_CEC_Reactive_SupplierControl::orb_
private

The typed event channel.

The ORB

CORBA::PolicyCurrent_var TAO_CEC_Reactive_SupplierControl::policy_current_
private

To control the timeout policy in the thread.

CORBA::PolicyList TAO_CEC_Reactive_SupplierControl::policy_list_
private

Precomputed policy list to the set timeout.

ACE_Time_Value TAO_CEC_Reactive_SupplierControl::rate_
private

The polling rate.

ACE_Reactor* TAO_CEC_Reactive_SupplierControl::reactor_
private

The ORB reactor.

unsigned int TAO_CEC_Reactive_SupplierControl::retries_
private

The number of retries per proxy until it is disconnected.

ACE_Time_Value TAO_CEC_Reactive_SupplierControl::timeout_
private

The polling timeout.

long TAO_CEC_Reactive_SupplierControl::timer_id_
private

The timer id.


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