1 #ifndef TAO_Notify_Tests_Consumer_T_CPP
2 #define TAO_Notify_Tests_Consumer_T_CPP
4 #include "Consumer_T.h"
7 template <class Consumer_Traits
>
8 TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::TAO_Notify_Tests_Consumer_T ()
12 template <class Consumer_Traits
>
13 TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::~TAO_Notify_Tests_Consumer_T ()
17 template <class Consumer_Traits
> typename TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::Proxy_Traits_PTR
18 TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::get_proxy_supplier ()
20 return this->get_proxy ();
23 template <class Consumer_Traits
> typename TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::Proxy_Traits_PTR
24 TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::obtain_proxy (typename TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::Admin_Traits_PTR admin_ptr
)
26 Consumer_Traits traits
;
28 CosNotifyChannelAdmin::ProxySupplier_var proxy_supplier
=
29 admin_ptr
->obtain_notification_push_supplier (traits
.type_
33 ACE_ASSERT (!CORBA::is_nil (proxy_supplier
.in ()));
35 return Proxy_Traits_INTERFACE::_narrow (proxy_supplier
.in ());
38 template <class Consumer_Traits
> typename TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::Proxy_Traits_PTR
39 TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::obtain_proxy (typename TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::Admin_Ext_Traits_PTR admin_ptr
40 , CosNotification::QoSProperties
& qos
)
42 Consumer_Traits traits
;
44 // create the proxy consumer
45 CosNotifyChannelAdmin::ProxySupplier_var proxy_supplier
=
46 admin_ptr
->obtain_notification_push_supplier_with_qos (traits
.type_
50 ACE_ASSERT (!CORBA::is_nil (proxy_supplier
.in ()));
52 return Proxy_Traits_INTERFACE::_narrow (proxy_supplier
.in ());
55 template <class Consumer_Traits
> void
56 TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::subscription_change (CosNotification::EventTypeSeq
&added
, CosNotification::EventTypeSeq
& removed
)
58 // Let the user see what we're subscribed for,
59 ACE_DEBUG ((LM_DEBUG
, "Calling Consumer subscription change: "));
63 for (; i
< added
.length (); ++i
)
65 ACE_DEBUG ((LM_DEBUG
, "+(%s,%s), ", added
[i
].domain_name
.in (), added
[i
].type_name
.in ()));
67 for (i
= 0; i
< removed
.length (); ++i
)
69 ACE_DEBUG ((LM_DEBUG
, "-(%s,%s), ", removed
[i
].domain_name
.in (), removed
[i
].type_name
.in ()));
72 ACE_DEBUG ((LM_DEBUG
, "\n"));
75 typename
Proxy_Traits::PTR proxy_supplier
= this->get_proxy ();
77 if (proxy_supplier
!= 0)
79 proxy_supplier
->subscription_change (added
, removed
);
82 ACE_DEBUG ((LM_DEBUG
, "Proxy Supplier not available, subscription change not made."));
85 template <class Consumer_Traits
> void
86 TAO_Notify_Tests_Consumer_T
<Consumer_Traits
>::offer_change
87 (const CosNotification::EventTypeSeq
& /*added*/,
88 const CosNotification::EventTypeSeq
& /*removed*/
94 #endif /* TAO_Notify_Tests_Consumer_T_CPP */