Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TAO_Notify_Consumer Class Reference

Astract Base class for wrapping consumer objects that connect to the EventChannel. More...

#include <Consumer.h>

Inheritance diagram for TAO_Notify_Consumer:

Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_Consumer:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ACE_Unbounded_Queue<
TAO_Notify_Method_Request_Event_Queueable * > 
Request_Queue
enum  DispatchStatus { DISPATCH_SUCCESS, DISPATCH_RETRY, DISPATCH_DISCARD, DISPATCH_FAIL }
 Status returned from dispatch attempts. More...

Public Member Functions

 TAO_Notify_Consumer (TAO_Notify_ProxySupplier *proxy)
 Constuctor.
virtual ~TAO_Notify_Consumer ()
 Destructor.
TAO_Notify_ProxySupplierproxy_supplier (void)
 Access Specific Proxy.
virtual TAO_Notify_Proxyproxy (void)
 Access Base Proxy.
void deliver (TAO_Notify_Method_Request_Event *request ACE_ENV_ARG_DECL)
 Dispatch Event to consumer.
virtual void push (const CORBA::Any &event ACE_ENV_ARG_DECL)=0
 Push <event> to this consumer.
virtual void push (const CosNotification::StructuredEvent &event ACE_ENV_ARG_DECL)=0
 Push <event> to this consumer.
virtual void push (const CosNotification::EventBatch &event ACE_ENV_ARG_DECL)=0
 Push a batch of events to this consumer.
DispatchStatus dispatch_batch (const CosNotification::EventBatch &batch)
 Dispatch the batch of events to the attached consumer.
void dispatch_pending (ACE_ENV_SINGLE_ARG_DECL)
 Dispatch the pending events.
CORBA::Boolean is_suspended (void)
 Is the connection suspended?
void suspend (ACE_ENV_SINGLE_ARG_DECL)
 Suspend Connection.
void resume (ACE_ENV_SINGLE_ARG_DECL)
 Resume Connection.
virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
 Shutdown the consumer.
virtual void reconnect_from_consumer (TAO_Notify_Consumer *old_consumer ACE_ENV_ARG_DECL)=0
virtual void qos_changed (const TAO_Notify_QoSProperties &qos_properties)
 Override, Peer::qos_changed.

Protected Member Functions

DispatchStatus dispatch_request (TAO_Notify_Method_Request_Event *request)
virtual bool dispatch_from_queue (Request_Queue &requests, ACE_Guard< TAO_SYNCH_MUTEX > &ace_mon)
 Attempt to dispatch event from a queue.
void enqueue_request (TAO_Notify_Method_Request_Event *request ACE_ENV_ARG_DECL)
virtual bool enqueue_if_necessary (TAO_Notify_Method_Request_Event *request ACE_ENV_ARG_DECL)
virtual void dispatch_updates_i (const CosNotification::EventTypeSeq &added, const CosNotification::EventTypeSeq &removed ACE_ENV_ARG_DECL)
 Implementation of Peer specific dispatch_updates.
TAO_SYNCH_MUTEXproxy_lock (void)
 Get the shared Proxy Lock.
virtual int handle_timeout (const ACE_Time_Value &current_time, const void *act=0)
void schedule_timer (bool is_error=false)
 Schedule timer.
void cancel_timer (void)
 Cancel timer.

Protected Attributes

TAO_Notify_ProxySupplierproxy_
 The Proxy that we associate with.
Request_Queuepending_events_
 Events pending to be delivered.
CORBA::Boolean is_suspended_
 Suspended Flag.
CosNotifyComm::NotifyPublish_var publish_
 Interface that accepts offer_changes.
const TAO_Notify_Property_Timepacing_
 The Pacing Interval.
TAO_Notify_Property_Long max_batch_size_
 Max. batch size.
long timer_id_
 Timer Id.
TAO_Notify_Timertimer_
 The Timer Manager that we use.

Detailed Description

Astract Base class for wrapping consumer objects that connect to the EventChannel.


Member Typedef Documentation

typedef ACE_Unbounded_Queue<TAO_Notify_Method_Request_Event_Queueable *> TAO_Notify_Consumer::Request_Queue
 


Member Enumeration Documentation

enum TAO_Notify_Consumer::DispatchStatus
 

Status returned from dispatch attempts.

Enumeration values:
DISPATCH_SUCCESS 
DISPATCH_RETRY 
DISPATCH_DISCARD 
DISPATCH_FAIL 


Constructor & Destructor Documentation

TAO_Notify_Consumer::TAO_Notify_Consumer TAO_Notify_ProxySupplier proxy  ) 
 

Constuctor.

TAO_Notify_Consumer::~TAO_Notify_Consumer  )  [virtual]
 

Destructor.


Member Function Documentation

void TAO_Notify_Consumer::cancel_timer void   )  [protected]
 

Cancel timer.

void TAO_Notify_Consumer::deliver TAO_Notify_Method_Request_Event *request  ACE_ENV_ARG_DECL  ) 
 

Dispatch Event to consumer.

TAO_Notify_Consumer::DispatchStatus TAO_Notify_Consumer::dispatch_batch const CosNotification::EventBatch batch  ) 
 

Dispatch the batch of events to the attached consumer.

bool TAO_Notify_Consumer::dispatch_from_queue Request_Queue requests,
ACE_Guard< TAO_SYNCH_MUTEX > &  ace_mon
[protected, virtual]
 

Attempt to dispatch event from a queue.

Called by dispatch_pending. Deliver one or more events to the Consumer. If delivery fails, events are left in the queue (or discarded depending on QoS parameters.) Undelivered, undiscarded requests are left at the front of the queue. Overridden in sequence consumer to dispatch as an EventBatch.

Returns:
false if delivery failed and the request(s) cannot be discarded.

void TAO_Notify_Consumer::dispatch_pending ACE_ENV_SINGLE_ARG_DECL   ) 
 

Dispatch the pending events.

TAO_Notify_Consumer::DispatchStatus TAO_Notify_Consumer::dispatch_request TAO_Notify_Method_Request_Event request  )  [protected]
 

void TAO_Notify_Consumer::dispatch_updates_i const CosNotification::EventTypeSeq added,
const CosNotification::EventTypeSeq &removed  ACE_ENV_ARG_DECL
[protected, virtual]
 

Implementation of Peer specific dispatch_updates.

Implements TAO_Notify_Peer.

bool TAO_Notify_Consumer::enqueue_if_necessary TAO_Notify_Method_Request_Event *request  ACE_ENV_ARG_DECL  )  [protected, virtual]
 

Add request to a queue if necessary. Overridden by sequence consumer to "always" put incoming events into the queue.

Returns:
true the request has been enqueued; false the request should be handled now.

void TAO_Notify_Consumer::enqueue_request TAO_Notify_Method_Request_Event *request  ACE_ENV_ARG_DECL  )  [protected]
 

int TAO_Notify_Consumer::handle_timeout const ACE_Time_Value current_time,
const void *  act = 0
[protected, virtual]
 

Reimplemented from ACE_Event_Handler.

CORBA::Boolean TAO_Notify_Consumer::is_suspended void   ) 
 

Is the connection suspended?

TAO_Notify_Proxy * TAO_Notify_Consumer::proxy void   )  [virtual]
 

Access Base Proxy.

Implements TAO_Notify_Peer.

TAO_SYNCH_MUTEX* TAO_Notify_Consumer::proxy_lock void   )  [protected]
 

Get the shared Proxy Lock.

TAO_Notify_ProxySupplier* TAO_Notify_Consumer::proxy_supplier void   ) 
 

Access Specific Proxy.

virtual void TAO_Notify_Consumer::push const CosNotification::EventBatch &event  ACE_ENV_ARG_DECL  )  [pure virtual]
 

Push a batch of events to this consumer.

virtual void TAO_Notify_Consumer::push const CosNotification::StructuredEvent &event  ACE_ENV_ARG_DECL  )  [pure virtual]
 

Push <event> to this consumer.

virtual void TAO_Notify_Consumer::push const CORBA::Any &event  ACE_ENV_ARG_DECL  )  [pure virtual]
 

Push <event> to this consumer.

void TAO_Notify_Consumer::qos_changed const TAO_Notify_QoSProperties qos_properties  )  [virtual]
 

Override, Peer::qos_changed.

Reimplemented from TAO_Notify_Peer.

virtual void TAO_Notify_Consumer::reconnect_from_consumer TAO_Notify_Consumer *old_consumer  ACE_ENV_ARG_DECL  )  [pure virtual]
 

on reconnect we need to move events from the old consumer to the new one

void TAO_Notify_Consumer::resume ACE_ENV_SINGLE_ARG_DECL   ) 
 

Resume Connection.

void TAO_Notify_Consumer::schedule_timer bool  is_error = false  )  [protected]
 

Schedule timer.

void TAO_Notify_Consumer::shutdown ACE_ENV_SINGLE_ARG_DECL   )  [virtual]
 

Shutdown the consumer.

Reimplemented from TAO_Notify_Peer.

void TAO_Notify_Consumer::suspend ACE_ENV_SINGLE_ARG_DECL   ) 
 

Suspend Connection.


Member Data Documentation

CORBA::Boolean TAO_Notify_Consumer::is_suspended_ [protected]
 

Suspended Flag.

TAO_Notify_Property_Long TAO_Notify_Consumer::max_batch_size_ [protected]
 

Max. batch size.

const TAO_Notify_Property_Time& TAO_Notify_Consumer::pacing_ [protected]
 

The Pacing Interval.

Request_Queue* TAO_Notify_Consumer::pending_events_ [protected]
 

Events pending to be delivered.

TAO_Notify_ProxySupplier* TAO_Notify_Consumer::proxy_ [protected]
 

The Proxy that we associate with.

CosNotifyComm::NotifyPublish_var TAO_Notify_Consumer::publish_ [protected]
 

Interface that accepts offer_changes.

TAO_Notify_Timer* TAO_Notify_Consumer::timer_ [protected]
 

The Timer Manager that we use.

long TAO_Notify_Consumer::timer_id_ [protected]
 

Timer Id.


The documentation for this class was generated from the following files:
Generated on Sun May 15 13:27:44 2005 for TAO_CosNotification by  doxygen 1.3.9.1