TAO_CosNotification
2.1.6
|
Astract Base class for wrapping consumer objects that connect to the EventChannel. More...
#include <Consumer.h>
Public Types | |
enum | DispatchStatus { DISPATCH_SUCCESS, DISPATCH_RETRY, DISPATCH_DISCARD, DISPATCH_FAIL, DISPATCH_FAIL_TIMEOUT } |
Status returned from dispatch attempts. More... | |
typedef TAO_Notify_Refcountable_Guard_T < TAO_Notify_Consumer > | Ptr |
![]() | |
![]() | |
typedef long | Reference_Count |
Public Member Functions | |
TAO_Notify_Consumer (TAO_Notify_ProxySupplier *proxy) | |
Constructor. | |
virtual | ~TAO_Notify_Consumer () |
Destructor. | |
CORBA::ULong | _incr_refcnt (void) |
This method sigantures deliberately match the RefCounting methods required for ESF Proxy. | |
CORBA::ULong | _decr_refcnt (void) |
TAO_Notify_ProxySupplier * | proxy_supplier (void) |
Access Specific Proxy. | |
virtual TAO_Notify_Proxy * | proxy (void) |
Access Base Proxy. | |
void | deliver (TAO_Notify_Method_Request_Event *request) |
Dispatch Event to consumer. | |
virtual void | push (const CORBA::Any &event)=0 |
Push event to this consumer. | |
virtual void | push (const CosNotification::StructuredEvent &event)=0 |
Push event to this consumer. | |
virtual void | push (const CosNotification::EventBatch &event)=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 (void) |
Dispatch the pending events. | |
CORBA::Boolean | is_suspended (void) |
Is the connection suspended? | |
void | suspend (void) |
Suspend Connection. | |
void | resume (void) |
Resume Connection. | |
virtual void | shutdown (void) |
Shutdown the consumer. | |
virtual void | reconnect_from_consumer (TAO_Notify_Consumer *old_consumer)=0 |
virtual void | qos_changed (const TAO_Notify_QoSProperties &qos_properties) |
Override, Peer::qos_changed. | |
void | assume_pending_events (TAO_Notify_Consumer &rhs) |
bool | is_alive (bool allow_nil_consumer) |
Is the connected consumer still around? | |
size_t | pending_count (void) |
![]() | |
TAO_Notify_Peer (void) | |
Constructor. | |
virtual | ~TAO_Notify_Peer () |
Destructor. | |
virtual void | dispatch_updates (const TAO_Notify_EventTypeSeq &added, const TAO_Notify_EventTypeSeq &removed) |
void | handle_dispatch_exception (void) |
Handle dispatch exceptions. | |
virtual ACE_CString | get_ior (void) const =0 |
Retrieve the ior of this peer. | |
![]() | |
virtual | ~ACE_Event_Handler (void) |
virtual ACE_HANDLE | get_handle (void) const |
virtual void | set_handle (ACE_HANDLE) |
virtual int | priority (void) const |
virtual void | priority (int priority) |
virtual int | handle_input (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_exception (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_exit (ACE_Process *) |
virtual int | handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) |
virtual int | handle_signal (int signum, siginfo_t *=0, ucontext_t *=0) |
virtual int | resume_handler (void) |
virtual int | handle_qos (ACE_HANDLE=ACE_INVALID_HANDLE) |
virtual int | handle_group_qos (ACE_HANDLE=ACE_INVALID_HANDLE) |
virtual void | reactor (ACE_Reactor *reactor) |
virtual ACE_Reactor * | reactor (void) const |
virtual ACE_Reactor_Timer_Interface * | reactor_timer_interface (void) const |
virtual Reference_Count | add_reference (void) |
virtual Reference_Count | remove_reference (void) |
Reference_Counting_Policy & | reference_counting_policy (void) |
Protected Types | |
typedef ACE_Unbounded_Queue < TAO_Notify_Method_Request_Event_Queueable * > | Request_Queue |
![]() | |
typedef ACE_Atomic_Op < ACE_SYNCH_MUTEX, Reference_Count > | Atomic_Reference_Count |
Protected Member Functions | |
virtual CORBA::Object_ptr | get_consumer (void)=0 |
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) |
virtual bool | enqueue_if_necessary (TAO_Notify_Method_Request_Event *request) |
virtual void | dispatch_updates_i (const CosNotification::EventTypeSeq &added, const CosNotification::EventTypeSeq &removed) |
Implementation of Peer specific dispatch_updates. | |
TAO_SYNCH_MUTEX * | proxy_lock (void) |
Get the shared Proxy Lock. | |
virtual int | handle_timeout (const ACE_Time_Value ¤t_time, const void *act=0) |
void | schedule_timer (bool is_error=false) |
Schedule timer. | |
void | cancel_timer (void) |
Cancel timer. | |
Request_Queue & | pending_events () |
= Protected Data Members | |
![]() | |
ACE_Event_Handler (ACE_Reactor *=0, int priority=ACE_Event_Handler::LO_PRIORITY) |
Protected Attributes | |
TAO_Notify_ProxySupplier * | proxy_ |
The Proxy that we associate with. | |
CORBA::Boolean | is_suspended_ |
Suspended Flag. | |
CosNotifyComm::NotifyPublish_var | publish_ |
Interface that accepts offer_changes. | |
bool | have_not_yet_verified_publish_ |
const TAO_Notify_Property_Time & | pacing_ |
The Pacing Interval. | |
TAO_Notify_Property_Long | max_batch_size_ |
Max. batch size. | |
long | timer_id_ |
Timer Id. | |
TAO_Notify_Timer::Ptr | timer_ |
The Timer Manager that we use. | |
ACE_Atomic_Op< TAO_SYNCH_MUTEX, ACE_Time_Value > | last_ping_ |
![]() | |
Atomic_Reference_Count | reference_count_ |
Private Attributes | |
ACE_Auto_Ptr< Request_Queue > | pending_events_ |
Events pending to be delivered. | |
CORBA::Object_var | rtt_obj_ |
Additional Inherited Members | |
![]() | |
static ACE_THR_FUNC_RETURN | read_adapter (void *event_handler) |
static int | register_stdin_handler (ACE_Event_Handler *eh, ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr, int flags=THR_DETACHED) |
static int | remove_stdin_handler (ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr) |
![]() | |
LO_PRIORITY | |
HI_PRIORITY | |
NULL_MASK | |
READ_MASK | |
WRITE_MASK | |
EXCEPT_MASK | |
ACCEPT_MASK | |
CONNECT_MASK | |
TIMER_MASK | |
QOS_MASK | |
GROUP_QOS_MASK | |
SIGNAL_MASK | |
ALL_EVENTS_MASK | |
RWE_MASK | |
DONT_CALL | |
ACE_EVENT_HANDLER_NOT_RESUMED | |
ACE_REACTOR_RESUMES_HANDLER | |
ACE_APPLICATION_RESUMES_HANDLER |
Astract Base class for wrapping consumer objects that connect to the EventChannel.
Reimplemented from TAO_Notify_Peer.
|
protected |
TAO_Notify_Consumer::TAO_Notify_Consumer | ( | TAO_Notify_ProxySupplier * | proxy | ) |
Constructor.
|
virtual |
Destructor.
CORBA::ULong TAO_Notify_Consumer::_decr_refcnt | ( | void | ) |
Reimplemented from TAO_Notify_Peer.
CORBA::ULong TAO_Notify_Consumer::_incr_refcnt | ( | void | ) |
This method sigantures deliberately match the RefCounting methods required for ESF Proxy.
Reimplemented from TAO_Notify_Peer.
void TAO_Notify_Consumer::assume_pending_events | ( | TAO_Notify_Consumer & | rhs | ) |
Take the pending queue from the rhs, cancel it's timer and schedule our timer. The caller should have locked the proxy lock before calling this method.
|
protected |
Cancel timer.
void TAO_Notify_Consumer::deliver | ( | TAO_Notify_Method_Request_Event * | request | ) |
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.
|
protectedvirtual |
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.
Reimplemented in TAO_Notify_SequencePushConsumer.
void TAO_Notify_Consumer::dispatch_pending | ( | void | ) |
Dispatch the pending events.
|
protected |
|
protectedvirtual |
Implementation of Peer specific dispatch_updates.
Implements TAO_Notify_Peer.
|
protectedvirtual |
Add request to a queue if necessary. Overridden by sequence consumer to "always" put incoming events into the queue.
Reimplemented in TAO_Notify_SequencePushConsumer.
|
protected |
|
protectedpure virtual |
This method is called by the is_alive() method. It should provide the connected consumer or nil if there is none.
Implemented in TAO_Notify_SequencePushConsumer, TAO_Notify_StructuredPushConsumer, and TAO_Notify_PushConsumer.
|
protectedvirtual |
Reimplemented from ACE_Event_Handler.
bool TAO_Notify_Consumer::is_alive | ( | bool | allow_nil_consumer | ) |
Is the connected consumer still around?
CORBA::Boolean TAO_Notify_Consumer::is_suspended | ( | void | ) |
Is the connection suspended?
size_t TAO_Notify_Consumer::pending_count | ( | void | ) |
Estimate how many events are pending delivery for this consumer
The estimate does not include events queued at the admin level which have not been passed to this consumer for delivery yet.
|
protected |
= Protected Data Members
|
virtual |
Access Base Proxy.
Implements TAO_Notify_Peer.
|
protected |
Get the shared Proxy Lock.
TAO_Notify_ProxySupplier * TAO_Notify_Consumer::proxy_supplier | ( | void | ) |
Access Specific Proxy.
|
pure virtual |
Push event to this consumer.
Implemented in TAO_Notify_SequencePushConsumer, TAO_Notify_StructuredPushConsumer, and TAO_Notify_PushConsumer.
|
pure virtual |
Push event to this consumer.
Implemented in TAO_Notify_SequencePushConsumer, TAO_Notify_StructuredPushConsumer, and TAO_Notify_PushConsumer.
|
pure virtual |
Push a batch of events to this consumer.
Implemented in TAO_Notify_SequencePushConsumer, TAO_Notify_StructuredPushConsumer, and TAO_Notify_PushConsumer.
|
virtual |
Override, Peer::qos_changed.
Reimplemented from TAO_Notify_Peer.
|
pure virtual |
On reconnect we need to move events from the old consumer to the new one
Implemented in TAO_Notify_SequencePushConsumer, TAO_Notify_StructuredPushConsumer, and TAO_Notify_PushConsumer.
void TAO_Notify_Consumer::resume | ( | void | ) |
Resume Connection.
|
protected |
Schedule timer.
: rather than is_error, use pacing interval so it will be configurable
: find some way to use batch buffering stratgy for sequence consumers.
|
virtual |
Shutdown the consumer.
Reimplemented from TAO_Notify_Peer.
void TAO_Notify_Consumer::suspend | ( | void | ) |
Suspend Connection.
|
protected |
|
protected |
Suspended Flag.
|
protected |
Last time either push an event or validate connection via _non_exist call.
|
protected |
Max. batch size.
|
protected |
The Pacing Interval.
|
private |
Events pending to be delivered.
|
protected |
The Proxy that we associate with.
|
protected |
Interface that accepts offer_changes.
|
private |
|
protected |
The Timer Manager that we use.
|
protected |
Timer Id.