#include <Peer.h>
Inheritance diagram for TAO_Notify_Peer:

Public Types | |
| typedef TAO_Notify_Refcountable_Guard_T< TAO_Notify_Peer > | Ptr |
Public Member Functions | |
| TAO_Notify_Peer (void) | |
| Constuctor. | |
| virtual | ~TAO_Notify_Peer () |
| Destructor. | |
| CORBA::ULong | _incr_refcnt (void) |
| This method sigantures deliberately match the RefCounting methods required for ESF Proxy. | |
| CORBA::ULong | _decr_refcnt (void) |
| virtual void | shutdown () |
| Shutdown the peer. | |
| virtual TAO_Notify_Proxy * | proxy (void)=0 |
| Access Proxy. | |
| virtual void | dispatch_updates (const TAO_Notify_EventTypeSeq &added, const TAO_Notify_EventTypeSeq &removed) |
| virtual void | qos_changed (const TAO_Notify_QoSProperties &qos_properties) |
| QoS changed notification from the Peer. | |
| void | handle_dispatch_exception () |
| Handle dispatch exceptions. | |
| virtual ACE_CString | get_ior (void) const=0 |
| Retrieve the ior of this peer. | |
Protected Member Functions | |
| virtual void | dispatch_updates_i (const CosNotification::EventTypeSeq &added, const CosNotification::EventTypeSeq &removed)=0 |
| Implementation of Peer specific dispatch_updates. | |
Private Member Functions | |
| virtual void | release (void)=0 |
| Release. | |
Definition at line 37 of file Peer.h.
|
|
|
|
|
Constuctor.
Definition at line 13 of file Peer.cpp.
00014 {
00015 }
|
|
|
Destructor.
Definition at line 17 of file Peer.cpp.
00018 {
00019 }
|
|
|
Definition at line 120 of file Peer.cpp. References TAO_Notify_Refcountable::_decr_refcnt(), and proxy().
00121 {
00122 return this->proxy ()->_decr_refcnt ();
00123 }
|
|
|
This method sigantures deliberately match the RefCounting methods required for ESF Proxy.
Definition at line 114 of file Peer.cpp. References TAO_Notify_Refcountable::_incr_refcnt(), and proxy().
00115 {
00116 return this->proxy ()->_incr_refcnt ();
00117 }
|
|
||||||||||||
|
Definition at line 41 of file Peer.cpp. References ACE_CATCH, ACE_CATCHANY, ACE_CHECK, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_TRY, ACE_TRY_CHECK, dispatch_updates_i(), CosNotification::EventTypeSeq, ACE_Unbounded_Set< TAO_Notify_EventType >::find(), handle_dispatch_exception(), TAO_Notify_EventTypeSeq::intersection(), TAO_Notify_EventTypeSeq::populate_no_special(), proxy(), TAO_Notify_EventTypeSeq::remove_seq(), TAO_Notify_EventType::special(), and TAO_Notify_Proxy::subscribed_types(). Referenced by TAO_Notify_Method_Request_Updates_T< SEQ, PROXY, SEQ_PARAM, PROXY_PARAM >::execute_i().
00042 {
00043 TAO_Notify_EventTypeSeq subscribed_types ;
00044 this->proxy ()->subscribed_types (subscribed_types ACE_ENV_ARG_PARAMETER);
00045 ACE_CHECK;
00046
00047 ACE_TRY
00048 {
00049 CosNotification::EventTypeSeq cos_added;
00050 CosNotification::EventTypeSeq cos_removed;
00051
00052 const TAO_Notify_EventType& special = TAO_Notify_EventType::special ();
00053
00054 // Don;t inform of types that we already know about.
00055 // E.g. if we're subscribed for {A,B,C,F}
00056 // and we receive an update with added list {A,B,G}
00057 // then, we should only send {G} because peer already knows about {A, B}
00058 // However if we're subscribed for everything, send all kinds of adds.
00059
00060 // Don;t inform of removed types that we don;t care about.
00061 // e.g. if we're currently subscribed for {A,B,C,F}
00062 // and we receive an update with removed list {A, B, D}
00063 // then, we should only send {A,B} because the peer is not interested in D.
00064 // However if we're subscribed for everything, send all kinds of removes.
00065
00066 TAO_Notify_EventTypeSeq added_result = added;
00067 TAO_Notify_EventTypeSeq removed_result;
00068
00069 if (subscribed_types.find (special) != 0)
00070 {
00071 added_result.remove_seq (subscribed_types);
00072 removed_result.intersection (subscribed_types, removed);
00073 }
00074 else
00075 {
00076 removed_result = removed;
00077 }
00078
00079 added_result.populate_no_special (cos_added);
00080 removed_result.populate_no_special (cos_removed);
00081
00082 if (cos_added.length () != 0 || cos_removed.length () != 0)
00083 {
00084 // Protect this object from being destroyed in this scope.
00085 TAO_Notify_Proxy::Ptr proxy_guard(this->proxy ());
00086
00087 this->dispatch_updates_i (cos_added, cos_removed ACE_ENV_ARG_PARAMETER);
00088 ACE_TRY_CHECK;
00089 }
00090 }
00091 ACE_CATCH (CORBA::OBJECT_NOT_EXIST, not_exist)
00092 {
00093 this->handle_dispatch_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
00094 ACE_TRY_CHECK;
00095 }
00096 ACE_CATCH (CORBA::NO_IMPLEMENT, no_impl)
00097 {
00098 // The peer does not implement the offer/subscription_change method
00099 // Do nothing. Later, perhaps set a flag that helps us decide if we should dispatch_updates_i.
00100 }
00101 ACE_CATCH (CORBA::SystemException, sysex)
00102 {
00103 this->handle_dispatch_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
00104 ACE_TRY_CHECK;
00105 }
00106 ACE_CATCHANY
00107 {
00108 // Do nothing
00109 }
00110 ACE_ENDTRY;
00111 }
|
|
||||||||||||
|
Implementation of Peer specific dispatch_updates.
Implemented in TAO_Notify_Consumer, and TAO_Notify_Supplier. Referenced by dispatch_updates(). |
|
|
Retrieve the ior of this peer.
Implemented in TAO_Notify_PushConsumer, TAO_Notify_PushSupplier, TAO_Notify_SequencePushConsumer, TAO_Notify_SequencePushSupplier, TAO_Notify_StructuredPushConsumer, and TAO_Notify_StructuredPushSupplier. Referenced by TAO_Notify_Proxy::save_attrs(). |
|
|
Handle dispatch exceptions.
Definition at line 34 of file Peer.cpp. References ACE_ENV_SINGLE_ARG_PARAMETER, TAO_Notify_Proxy::destroy(), and proxy(). Referenced by dispatch_updates().
|
|
|
Access Proxy.
Implemented in TAO_Notify_Consumer, and TAO_Notify_Supplier. Referenced by _decr_refcnt(), _incr_refcnt(), dispatch_updates(), and handle_dispatch_exception(). |
|
|
QoS changed notification from the Peer.
Reimplemented in TAO_Notify_Consumer. Definition at line 22 of file Peer.cpp. Referenced by TAO_Notify_Proxy::qos_changed().
00023 {
00024 // NOP.
00025 }
|
|
|
|
Shutdown the peer.
Reimplemented in TAO_Notify_Consumer. Definition at line 28 of file Peer.cpp.
00029 {
00030 // NOP.
00031 }
|
1.3.6