summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.cpp')
-rw-r--r--TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.cpp64
1 files changed, 24 insertions, 40 deletions
diff --git a/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.cpp b/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.cpp
index 3f8b943dba2..29cabc964bb 100644
--- a/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.cpp
+++ b/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.cpp
@@ -29,7 +29,7 @@ TAO_Notify_ThreadPool_Consumer::~TAO_Notify_ThreadPool_Consumer (void)
void
TAO_Notify_ThreadPool_Consumer::init (PortableServer::POA_var& poa, CosNotifyChannelAdmin::ConsumerAdmin_var& admin,
- int proxy_supplier_thread_count, int max_events, long delay ACE_ENV_ARG_DECL)
+ int proxy_supplier_thread_count, int max_events, long delay)
{
this->default_POA_ = poa;
this->admin_ = admin;
@@ -39,35 +39,33 @@ TAO_Notify_ThreadPool_Consumer::init (PortableServer::POA_var& poa, CosNotifyCha
ACE_DEBUG ((LM_DEBUG, "(%P, %t)Consumer Delay = %d, param = %d\n", delay_.sec (), delay));
- this->connect (ACE_ENV_SINGLE_ARG_PARAMETER);
+ this->connect ();
}
PortableServer::POA_ptr
-TAO_Notify_ThreadPool_Consumer::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+TAO_Notify_ThreadPool_Consumer::_default_POA (void)
{
return PortableServer::POA::_duplicate (this->default_POA_.in ());
}
void
-TAO_Notify_ThreadPool_Consumer::run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+TAO_Notify_ThreadPool_Consumer::run (void)
{
// Nothing to do.
}
void
-TAO_Notify_ThreadPool_Consumer::connect (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_ThreadPool_Consumer::connect (void)
{
// Activate the consumer with the default_POA_
- CosNotifyComm::StructuredPushConsumer_var objref = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ CosNotifyComm::StructuredPushConsumer_var objref = this->_this ();
CosNotifyChannelAdmin::ProxySupplier_var proxysupplier;
if (this->proxy_supplier_thread_count_ != 0)
{
// Narrow to the extended interface.
- NotifyExt::ConsumerAdmin_var admin_ext = NotifyExt::ConsumerAdmin::_narrow (this->admin_.in ()ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ NotifyExt::ConsumerAdmin_var admin_ext = NotifyExt::ConsumerAdmin::_narrow (this->admin_.in ());
NotifyExt::ThreadPoolParams tp_params = { NotifyExt::CLIENT_PROPAGATED, 0,
0, this->proxy_supplier_thread_count_, 0, 0, 0, 0, 0 };
@@ -79,28 +77,23 @@ TAO_Notify_ThreadPool_Consumer::connect (ACE_ENV_SINGLE_ARG_DECL)
// Obtain the proxy. The QoS is applied to the POA in which the Proxy is hosted.
proxysupplier = admin_ext->obtain_notification_push_supplier_with_qos (CosNotifyChannelAdmin::STRUCTURED_EVENT
- , proxy_supplier_id_, qos ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ , proxy_supplier_id_, qos);
}
else
{
proxysupplier = this->admin_->obtain_notification_push_supplier (CosNotifyChannelAdmin::STRUCTURED_EVENT
- , proxy_supplier_id_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ , proxy_supplier_id_);
}
ACE_ASSERT (!CORBA::is_nil (proxysupplier.in ()));
// narrow
this->proxy_supplier_ =
- CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow (proxysupplier.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow (proxysupplier.in ());
ACE_ASSERT (!CORBA::is_nil (proxy_supplier_.in ()));
- this->proxy_supplier_->connect_structured_push_consumer (objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->proxy_supplier_->connect_structured_push_consumer (objref.in ());
// Call subscription_change to inform the supplier that this consumer is available.
CosNotification::EventTypeSeq added (1);
@@ -115,24 +108,22 @@ TAO_Notify_ThreadPool_Consumer::connect (ACE_ENV_SINGLE_ARG_DECL)
added[0].type_name = CORBA::string_dup (type);
- this->proxy_supplier_->subscription_change (added, removed ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->proxy_supplier_->subscription_change (added, removed);
ACE_DEBUG ((LM_DEBUG, "(%P,%t) Created Consumer %d with %d threads at the ProxySupplier\n", proxy_supplier_id_,
this->proxy_supplier_thread_count_));
}
void
-TAO_Notify_ThreadPool_Consumer::disconnect (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_ThreadPool_Consumer::disconnect (void)
{
- this->proxy_supplier_->disconnect_structured_push_supplier(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->proxy_supplier_->disconnect_structured_push_supplier();
}
void
TAO_Notify_ThreadPool_Consumer::offer_change (const CosNotification::EventTypeSeq & /*added*/,
const CosNotification::EventTypeSeq & /*removed*/
- ACE_ENV_ARG_DECL_NOT_USED)
+ )
ACE_THROW_SPEC ((
CORBA::SystemException,
CosNotifyComm::InvalidEventType
@@ -143,7 +134,7 @@ TAO_Notify_ThreadPool_Consumer::offer_change (const CosNotification::EventTypeSe
void
TAO_Notify_ThreadPool_Consumer::push_structured_event (const CosNotification::StructuredEvent & /*notification*/
- ACE_ENV_ARG_DECL)
+ )
ACE_THROW_SPEC ((
CORBA::SystemException,
CosEventComm::Disconnected
@@ -167,12 +158,10 @@ TAO_Notify_ThreadPool_Consumer::push_structured_event (const CosNotification::St
this->t_last_ = ACE_OS::gethrtime ();
// Disconnect from the EC
- this->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->disconnect ();
// Deactivate this object.
- this->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->deactivate ();
// We received the event, shutdown the ORB.
this->orb_objects_.orb_->shutdown (1);
@@ -195,25 +184,20 @@ TAO_Notify_ThreadPool_Consumer::dump_throughput (void)
}
void
-TAO_Notify_ThreadPool_Consumer::deactivate (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_ThreadPool_Consumer::deactivate (void)
{
- PortableServer::POA_var poa (this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK;
+ PortableServer::POA_var poa (this->_default_POA ());
- PortableServer::ObjectId_var id (poa->servant_to_id (this
- ACE_ENV_ARG_PARAMETER));
- ACE_CHECK;
+ PortableServer::ObjectId_var id (poa->servant_to_id (this));
- poa->deactivate_object (id.in()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ poa->deactivate_object (id.in());
}
void
-TAO_Notify_ThreadPool_Consumer::disconnect_structured_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_ThreadPool_Consumer::disconnect_structured_push_consumer (void)
ACE_THROW_SPEC ((
CORBA::SystemException
))
{
- this->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ this->deactivate ();
}