summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp207
1 files changed, 110 insertions, 97 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp b/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp
index a7ffa89f53a..a90e8a16e62 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp
@@ -1,12 +1,6 @@
// $Id$
#include "SupplierAdmin.h"
-#include "Builder.h"
-#include "Proxy.h"
-#include "EventChannel.h"
-#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
-#include "QoSAdmin.h"
-#include "Subscription_Change_Worker.h"
#if ! defined (__ACE_INLINE__)
#include "SupplierAdmin.inl"
@@ -14,6 +8,15 @@
ACE_RCSID(RT_Notify, TAO_NS_SupplierAdmin, "$Id$")
+#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
+#include "Builder.h"
+#include "Proxy.h"
+#include "EventChannel.h"
+#include "Subscription_Change_Worker.h"
+#include "Find_Worker_T.h"
+#include "Seq_Worker_T.h"
+#include "Properties.h"
+
TAO_NS_SupplierAdmin::TAO_NS_SupplierAdmin (void)
{
}
@@ -22,21 +25,25 @@ TAO_NS_SupplierAdmin::~TAO_NS_SupplierAdmin ()
{
}
-
-PortableServer::Servant
-TAO_NS_SupplierAdmin::servant (void)
+void
+TAO_NS_SupplierAdmin::init (TAO_NS_EventChannel *ec ACE_ENV_ARG_DECL)
{
- return this;
+ TAO_NS_Admin::init (ec);
+
+ const CosNotification::QoSProperties &default_sa_qos =
+ TAO_NS_PROPERTIES::instance ()->default_supplier_admin_qos_properties ();
+
+ this->set_qos (default_sa_qos ACE_ENV_ARG_PARAMETER);
}
void
-TAO_NS_SupplierAdmin::_add_ref (ACE_ENV_SINGLE_ARG_DECL)
+TAO_NS_SupplierAdmin::_add_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
{
this->_incr_refcnt ();
}
void
-TAO_NS_SupplierAdmin::_remove_ref (ACE_ENV_SINGLE_ARG_DECL)
+TAO_NS_SupplierAdmin::_remove_ref (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
{
this->_decr_refcnt ();
}
@@ -54,138 +61,110 @@ TAO_NS_SupplierAdmin::destroy (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- this->inherited::destroy (this ACE_ENV_ARG_PARAMETER);
+ if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ return;
+
+ ACE_CHECK;
+
+ this->ec_->remove (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
}
void
-TAO_NS_SupplierAdmin::set_qos (const CosNotification::QoSProperties & qos)
+TAO_NS_SupplierAdmin::set_qos (const CosNotification::QoSProperties & qos ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
, CosNotification::UnsupportedQoS
))
{
- this->qos_admin_->apply_qos (this, qos ACE_ENV_ARG_PARAMETER);
+ this->TAO_NS_Object::set_qos (qos ACE_ENV_ARG_PARAMETER);
}
-CosNotifyChannelAdmin::ProxyConsumer_ptr
-TAO_NS_SupplierAdmin::obtain_notification_push_consumer (CosNotifyChannelAdmin::ClientType ctype, CosNotifyChannelAdmin::ProxyID_out proxy_id ACE_ENV_ARG_DECL)
+CosNotification::QoSProperties*
+TAO_NS_SupplierAdmin::get_qos (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
- , CosNotifyChannelAdmin::AdminLimitExceeded
))
-
{
- return TAO_NS_PROPERTIES::instance()->builder ()->build_notification_push_consumer (this,
- ctype,
- proxy_id ACE_ENV_ARG_PARAMETER);
+ return this->TAO_NS_Object::get_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
}
-CosNotifyChannelAdmin::AdminID TAO_NS_SupplierAdmin::MyID (
-
- )
+CosNotifyChannelAdmin::ProxyConsumer_ptr
+TAO_NS_SupplierAdmin::obtain_notification_push_consumer (CosNotifyChannelAdmin::ClientType ctype
+ , CosNotifyChannelAdmin::ProxyID_out proxy_id
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
+ , CosNotifyChannelAdmin::AdminLimitExceeded
))
{
- return this->id ();
+ return TAO_NS_PROPERTIES::instance()->builder()->build_proxy (this
+ , ctype
+ , proxy_id
+ ACE_ENV_ARG_PARAMETER);
}
-::CosNotifyChannelAdmin::EventChannel_ptr TAO_NS_SupplierAdmin::MyChannel (
-
- )
+CosEventChannelAdmin::ProxyPushConsumer_ptr
+TAO_NS_SupplierAdmin::obtain_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
))
-
{
- //Add your implementation here
- return 0;
+ return TAO_NS_PROPERTIES::instance()->builder()->build_proxy (this ACE_ENV_ARG_PARAMETER);
}
-::CosNotifyChannelAdmin::InterFilterGroupOperator
-TAO_NS_SupplierAdmin::MyOperator (ACE_ENV_SINGLE_ARG_DECL)
+CosNotifyChannelAdmin::AdminID
+TAO_NS_SupplierAdmin::MyID (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((
CORBA::SystemException
))
{
- return this->filter_operator_;
+ return this->id ();
}
-::CosNotifyChannelAdmin::ProxyIDSeq * TAO_NS_SupplierAdmin::pull_consumers (
-
- )
+CosNotifyChannelAdmin::EventChannel_ptr
+TAO_NS_SupplierAdmin::MyChannel (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
))
-
{
- //Add your implementation here
- return 0;
+ return this->ec_->_this (ACE_ENV_SINGLE_ARG_DECL);
}
-::CosNotifyChannelAdmin::ProxyIDSeq * TAO_NS_SupplierAdmin::push_consumers (
-
- )
+::CosNotifyChannelAdmin::InterFilterGroupOperator
+TAO_NS_SupplierAdmin::MyOperator (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((
CORBA::SystemException
))
-
{
- //Add your implementation here
- return 0;
+ return this->filter_operator_;
}
-::CosNotifyChannelAdmin::ProxyConsumer_ptr TAO_NS_SupplierAdmin::get_proxy_consumer (
- CosNotifyChannelAdmin::ProxyID proxy_id
- )
+CosNotifyChannelAdmin::ProxyIDSeq*
+TAO_NS_SupplierAdmin::push_consumers (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
- , CosNotifyChannelAdmin::ProxyNotFound
))
-
{
- //Add your implementation here
- return 0;
-}
+ TAO_NS_Seq_Worker_T<TAO_NS_Proxy> seq_worker;
-::CosNotifyChannelAdmin::ProxyConsumer_ptr TAO_NS_SupplierAdmin::obtain_notification_pull_consumer (
- CosNotifyChannelAdmin::ClientType ctype,
- CosNotifyChannelAdmin::ProxyID_out proxy_id
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- , CosNotifyChannelAdmin::AdminLimitExceeded
- ))
-
-{
- //Add your implementation here
- return 0;
+ return seq_worker.create (*this->proxy_container_ ACE_ENV_ARG_PARAMETER);
}
-::CosNotification::QoSProperties * TAO_NS_SupplierAdmin::get_qos (
-
- )
+CosNotifyChannelAdmin::ProxyConsumer_ptr
+TAO_NS_SupplierAdmin::get_proxy_consumer (CosNotifyChannelAdmin::ProxyID proxy_id ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
+ , CosNotifyChannelAdmin::ProxyNotFound
))
-
{
- //Add your implementation here
- return 0;
-}
+ TAO_NS_Find_Worker_T<TAO_NS_Proxy
+ , CosNotifyChannelAdmin::ProxyConsumer
+ , CosNotifyChannelAdmin::ProxyConsumer_ptr
+ , CosNotifyChannelAdmin::ProxyNotFound> find_worker;
-void TAO_NS_SupplierAdmin::validate_qos (
- const CosNotification::QoSProperties & required_qos,
- CosNotification::NamedPropertyRangeSeq_out available_qos
- )
- ACE_THROW_SPEC ((
- CORBA::SystemException
- , CosNotification::UnsupportedQoS
- ))
-
-{
- //Add your implementation here
+ return find_worker.resolve (proxy_id, *this->proxy_container_ ACE_ENV_ARG_PARAMETER);
}
void
@@ -208,11 +187,11 @@ TAO_NS_SupplierAdmin::offer_change (const CosNotification::EventTypeSeq & added,
ACE_CHECK;
this->subscribed_types_.init (seq_added, seq_removed);
- }
- TAO_NS_Subscription_Change_Worker worker (added, removed);
+ TAO_NS_Subscription_Change_Worker worker (added, removed);
- this->collection_->for_each (&worker ACE_ENV_ARG_PARAMETER);
+ this->proxy_container_->collection ()->for_each (&worker ACE_ENV_ARG_PARAMETER);
+ }
}
CosNotifyFilter::FilterID
@@ -259,29 +238,63 @@ TAO_NS_SupplierAdmin::remove_all_filters (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- this->filter_admin_.get_all_filters (ACE_ENV_SINGLE_ARG_PARAMETER);
+ this->filter_admin_.remove_all_filters (ACE_ENV_SINGLE_ARG_PARAMETER);
}
-::CosEventChannelAdmin::ProxyPushConsumer_ptr TAO_NS_SupplierAdmin::obtain_push_consumer (
+/************** UNIMPLEMENTED METHODS ***************/
- )
+CosEventChannelAdmin::ProxyPullConsumer_ptr
+TAO_NS_SupplierAdmin::obtain_pull_consumer (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
))
+{
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosEventChannelAdmin::ProxyPullConsumer::_nil ());
+}
+CosNotifyChannelAdmin::ProxyIDSeq*
+TAO_NS_SupplierAdmin::pull_consumers (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
{
- //Add your implementation here
- return 0;
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
}
-::CosEventChannelAdmin::ProxyPullConsumer_ptr TAO_NS_SupplierAdmin::obtain_pull_consumer (
- )
+void
+TAO_NS_SupplierAdmin::validate_qos (const CosNotification::QoSProperties & /*required_qos*/,
+ CosNotification::NamedPropertyRangeSeq_out /*available_qos*/
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
+ , CosNotification::UnsupportedQoS
))
+{
+ ACE_THROW (CORBA::NO_IMPLEMENT ());
+}
+CosNotifyChannelAdmin::ProxyConsumer_ptr
+TAO_NS_SupplierAdmin::obtain_notification_pull_consumer (CosNotifyChannelAdmin::ClientType /*ctype*/,
+ CosNotifyChannelAdmin::ProxyID_out /*proxy_id*/
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ , CosNotifyChannelAdmin::AdminLimitExceeded
+ ))
{
- //Add your implementation here
- return 0;
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosNotifyChannelAdmin::ProxyConsumer::_nil ());
}
+
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class TAO_NS_Find_Worker_T<TAO_NS_Proxy>;
+template class TAO_NS_Find_Worker_T<TAO_NS_Proxy>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate TAO_NS_Find_Worker_T<TAO_NS_Proxy>
+#pragma instantiate TAO_NS_Find_Worker_T<TAO_NS_Proxy>
+
+#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */