TAO_CosEvent 4.0.0
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TAO_CEC_Reactive_ConsumerControl Class Reference

ConsumerControl. More...

#include <CEC_Reactive_ConsumerControl.h>

Inheritance diagram for TAO_CEC_Reactive_ConsumerControl:
Inheritance graph
[legend]
Collaboration diagram for TAO_CEC_Reactive_ConsumerControl:
Collaboration graph
[legend]

Public Member Functions

 TAO_CEC_Reactive_ConsumerControl (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_ConsumerControl ()
 Constructor for the typed ec.
 
void handle_timeout (const ACE_Time_Value &tv, const void *arg)
 Receive the timeout from the adapter.
 
virtual int activate ()
 
virtual int shutdown ()
 
virtual void consumer_not_exist (TAO_CEC_ProxyPushSupplier *proxy)
 
virtual void consumer_not_exist (TAO_CEC_ProxyPullSupplier *proxy)
 
virtual void system_exception (TAO_CEC_ProxyPushSupplier *proxy, CORBA::SystemException &)
 Some system exception was rasied while trying to push an event.
 
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.
 
- Public Member Functions inherited from TAO_CEC_ConsumerControl
 TAO_CEC_ConsumerControl ()
 Constructor.
 
virtual ~TAO_CEC_ConsumerControl ()
 Destructor.
 

Private Member Functions

void query_consumers ()
 

Private Attributes

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

Detailed Description

ConsumerControl.

Defines the interface for the consumer control strategy. This strategy handles misbehaving or failing consumers. = MEMORY MANAGEMENT = LOCKING = TODO

Constructor & Destructor Documentation

◆ TAO_CEC_Reactive_ConsumerControl()

TAO_CEC_Reactive_ConsumerControl::TAO_CEC_Reactive_ConsumerControl ( 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_ConsumerControl()

TAO_CEC_Reactive_ConsumerControl::~TAO_CEC_Reactive_ConsumerControl ( )
virtual

Constructor for the typed ec.

destructor...

Member Function Documentation

◆ activate()

int TAO_CEC_Reactive_ConsumerControl::activate ( )
virtual

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

Reimplemented from TAO_CEC_ConsumerControl.

◆ consumer_not_exist() [1/2]

void TAO_CEC_Reactive_ConsumerControl::consumer_not_exist ( TAO_CEC_ProxyPullSupplier * proxy)
virtual

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

Reimplemented from TAO_CEC_ConsumerControl.

◆ consumer_not_exist() [2/2]

void TAO_CEC_Reactive_ConsumerControl::consumer_not_exist ( TAO_CEC_ProxyPushSupplier * proxy)
virtual

When pushing an event to the consumer 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_CEC_ConsumerControl.

◆ handle_timeout()

void TAO_CEC_Reactive_ConsumerControl::handle_timeout ( const ACE_Time_Value & tv,
const void * arg )

Receive the timeout from the adapter.

◆ need_to_disconnect()

bool TAO_CEC_Reactive_ConsumerControl::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_ConsumerControl.

◆ query_consumers()

void TAO_CEC_Reactive_ConsumerControl::query_consumers ( )
private

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

◆ shutdown()

int TAO_CEC_Reactive_ConsumerControl::shutdown ( )
virtual

Reimplemented from TAO_CEC_ConsumerControl.

◆ successful_transmission()

void TAO_CEC_Reactive_ConsumerControl::successful_transmission ( PortableServer::ServantBase * proxy)
virtual

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

Reimplemented from TAO_CEC_ConsumerControl.

◆ system_exception()

void TAO_CEC_Reactive_ConsumerControl::system_exception ( TAO_CEC_ProxyPushSupplier * proxy,
CORBA::SystemException &  )
virtual

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

Reimplemented from TAO_CEC_ConsumerControl.

Member Data Documentation

◆ adapter_

TAO_CEC_ConsumerControl_Adapter TAO_CEC_Reactive_ConsumerControl::adapter_
private

The Adapter for the reactor events.

◆ event_channel_

TAO_CEC_EventChannel* TAO_CEC_Reactive_ConsumerControl::event_channel_
private

The event channel.

◆ orb_

CORBA::ORB_var TAO_CEC_Reactive_ConsumerControl::orb_
private

The typed event channel.

The ORB

◆ policy_current_

CORBA::PolicyCurrent_var TAO_CEC_Reactive_ConsumerControl::policy_current_
private

To control the timeout policy in the thread.

◆ policy_list_

CORBA::PolicyList TAO_CEC_Reactive_ConsumerControl::policy_list_
private

Precomputed policy list to the set timeout.

◆ rate_

ACE_Time_Value TAO_CEC_Reactive_ConsumerControl::rate_
private

The polling rate.

◆ reactor_

ACE_Reactor* TAO_CEC_Reactive_ConsumerControl::reactor_
private

The ORB reactor.

◆ retries_

unsigned int TAO_CEC_Reactive_ConsumerControl::retries_
private

The number of retries per proxy until it is disconnected.

◆ timeout_

ACE_Time_Value TAO_CEC_Reactive_ConsumerControl::timeout_
private

The polling timeout.


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