TAO_EC_Simple_Queue_Full_Action Class Reference

#include <EC_Dispatching_Task.h>

Inheritance diagram for TAO_EC_Simple_Queue_Full_Action:

Inheritance graph
[legend]
Collaboration diagram for TAO_EC_Simple_Queue_Full_Action:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_EC_Simple_Queue_Full_Action ()
virtual int init (int argc, char *argv[])
virtual int fini (void)
virtual int queue_full_action (TAO_EC_Dispatching_Task *task, TAO_EC_ProxyPushSupplier *proxy, RtecEventComm::PushConsumer_ptr consumer, RtecEventComm::EventSet &event ACE_ENV_ARG_DECL)

Static Public Member Functions

int init_svcs (void)

Protected Attributes

int queue_full_action_return_value_

Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_EC_Simple_Queue_Full_Action::TAO_EC_Simple_Queue_Full_Action  ) 
 

Definition at line 22 of file EC_Dispatching_Task.cpp.

00023   : queue_full_action_return_value_ (WAIT_TO_EMPTY)
00024 {
00025 }


Member Function Documentation

int TAO_EC_Simple_Queue_Full_Action::fini void   )  [virtual]
 

Reimplemented from ACE_Shared_Object.

Definition at line 65 of file EC_Dispatching_Task.cpp.

00066 {
00067   return 0;
00068 }

int TAO_EC_Simple_Queue_Full_Action::init int  argc,
char *  argv[]
[virtual]
 

Definition at line 37 of file EC_Dispatching_Task.cpp.

References queue_full_action_return_value_, and ACE_OS::strcasecmp().

00038 {
00039   // Here we look at the args and set an internal flag indicating whether
00040   // the default action should be to wait for the queue to not be full
00041   // or whether it should be to silently discard the event.
00042 
00043   // @@ This should use the arg shifter stuff, but let's keep it simple to
00044   // start.
00045 
00046   do {
00047     if (argc == 0)
00048       break;
00049 
00050     if (ACE_OS::strcasecmp ("wait", argv[0]) == 0)
00051       this->queue_full_action_return_value_ = WAIT_TO_EMPTY;
00052     else if (ACE_OS::strcasecmp ("discard", argv[0]) == 0)
00053       this->queue_full_action_return_value_ = SILENTLY_DISCARD;
00054 #if 0
00055     else
00056       ;
00057     // probably ought to print an error message here
00058 #endif
00059   } while (0);
00060 
00061   return 0;
00062 }

int TAO_EC_Simple_Queue_Full_Action::init_svcs void   )  [static]
 

Helper function to register the default action into the service configurator.

Definition at line 30 of file EC_Dispatching_Task.cpp.

References ACE_Service_Config::static_svcs().

Referenced by TAO_EC_TPC_Factory::init_svcs(), and TAO_EC_Default_Factory::init_svcs().

00031 {
00032   return ACE_Service_Config::static_svcs ()->
00033     insert (&ace_svc_desc_TAO_EC_Simple_Queue_Full_Action);
00034 }

virtual int TAO_EC_Simple_Queue_Full_Action::queue_full_action TAO_EC_Dispatching_Task task,
TAO_EC_ProxyPushSupplier proxy,
RtecEventComm::PushConsumer_ptr  consumer,
RtecEventComm::EventSet &event  ACE_ENV_ARG_DECL
[virtual]
 

Implements TAO_EC_Queue_Full_Service_Object.


Member Data Documentation

int TAO_EC_Simple_Queue_Full_Action::queue_full_action_return_value_ [protected]
 

Definition at line 78 of file EC_Dispatching_Task.h.

Referenced by init().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:15:46 2006 for TAO_RTEvent by doxygen 1.3.6