From 4bfc546b651fc7b99aba5b297e121ff315c0865b Mon Sep 17 00:00:00 2001 From: pradeep Date: Wed, 17 Nov 1999 07:41:05 +0000 Subject: *** empty log message *** --- TAO/orbsvcs/orbsvcs/Notify/ID_Pool_T.h | 47 ++++ TAO/orbsvcs/orbsvcs/Notify/ID_Pool_T.i | 13 + TAO/orbsvcs/orbsvcs/Notify/NotifyPublish_i.cpp | 25 ++ TAO/orbsvcs/orbsvcs/Notify/NotifyPublish_i.h | 55 +++++ TAO/orbsvcs/orbsvcs/Notify/NotifySubscribe_i.cpp | 25 ++ TAO/orbsvcs/orbsvcs/Notify/NotifySubscribe_i.h | 51 ++++ .../orbsvcs/Notify/Notify_ConsumerAdmin_i.cpp | 270 ++++++++++++++++++++ .../orbsvcs/Notify/Notify_ConsumerAdmin_i.h | 197 +++++++++++++++ TAO/orbsvcs/orbsvcs/Notify/Notify_Dispatcher.cpp | 50 ++++ TAO/orbsvcs/orbsvcs/Notify/Notify_Dispatcher.h | 69 ++++++ .../Notify/Notify_EventChannelFactory_i.cpp | 90 +++++++ .../orbsvcs/Notify/Notify_EventChannelFactory_i.h | 84 +++++++ .../orbsvcs/Notify/Notify_EventChannel_i.cpp | 275 +++++++++++++++++++++ TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h | 206 +++++++++++++++ .../orbsvcs/Notify/Notify_FilterAdmin_i.cpp | 75 ++++++ TAO/orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h | 82 ++++++ .../orbsvcs/Notify/Notify_ProxyConsumer_i.cpp | 73 ++++++ .../orbsvcs/Notify/Notify_ProxyConsumer_i.h | 85 +++++++ .../orbsvcs/Notify/Notify_ProxyPushConsumer_i.cpp | 57 +++++ .../orbsvcs/Notify/Notify_ProxyPushConsumer_i.h | 77 ++++++ .../orbsvcs/Notify/Notify_ProxyPushSupplier_i.cpp | 79 ++++++ .../orbsvcs/Notify/Notify_ProxyPushSupplier_i.h | 89 +++++++ .../orbsvcs/Notify/Notify_ProxySupplier_i.cpp | 120 +++++++++ .../orbsvcs/Notify/Notify_ProxySupplier_i.h | 117 +++++++++ TAO/orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.cpp | 51 ++++ TAO/orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h | 67 +++++ .../orbsvcs/Notify/Notify_SupplierAdmin_i.cpp | 210 ++++++++++++++++ .../orbsvcs/Notify/Notify_SupplierAdmin_i.h | 171 +++++++++++++ 28 files changed, 2810 insertions(+) create mode 100644 TAO/orbsvcs/orbsvcs/Notify/ID_Pool_T.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/ID_Pool_T.i create mode 100644 TAO/orbsvcs/orbsvcs/Notify/NotifyPublish_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/NotifyPublish_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/NotifySubscribe_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/NotifySubscribe_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_Dispatcher.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_Dispatcher.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp create mode 100644 TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h (limited to 'TAO') diff --git a/TAO/orbsvcs/orbsvcs/Notify/ID_Pool_T.h b/TAO/orbsvcs/orbsvcs/Notify/ID_Pool_T.h new file mode 100644 index 00000000000..31d922fb98e --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/ID_Pool_T.h @@ -0,0 +1,47 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// ID_Pool_T.h +// +// = DESCRIPTION +// A class to generate ID's and recycle them. +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef ID_POOL_T_H +#define ID_POOL_T_H + +template +class ID_Pool +{ + // = TITLE + // ID_Pool + // = DESCRIPTION + // This class is used by factories that need to associate id's with the + // objects that they create.When the objects are destroyed, these id's + // can be reused, hence the need to recycle. + // + + public: + ID_TYPE get (void); + // Returns a new or recycled ID + + void put (ID_TYPE id); + // Put an ID back so that it might be recycled. + private: + ID_TYPE id_; +}; + +#if defined (__ACE_INLINE__) +#include "ID_Pool_T.i" +#endif /* __ACE_INLINE__ */ + +#endif /* ID_POOL_T_H */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/ID_Pool_T.i b/TAO/orbsvcs/orbsvcs/Notify/ID_Pool_T.i new file mode 100644 index 00000000000..1ab6c8d74bb --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/ID_Pool_T.i @@ -0,0 +1,13 @@ +/* -*- C++ -*- $Id$ */ + +template ACE_INLINE ID_TYPE +ID_Pool::get (void) +{ + return ++id_; +} + +template ACE_INLINE void +ID_Pool::put (ID_TYPE id) +{ + // TBD: +} diff --git a/TAO/orbsvcs/orbsvcs/Notify/NotifyPublish_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/NotifyPublish_i.cpp new file mode 100644 index 00000000000..ba92ccfbc96 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/NotifyPublish_i.cpp @@ -0,0 +1,25 @@ +/* -*- C++ -*- $Id$ */ +#include "orbsvcs/orbsvcs/Notify/NotifyPublish_i.h" + +// Implementation skeleton constructor +TAO_NotifyPublish_i::TAO_NotifyPublish_i (void) +{ +} + +// Implementation skeleton destructor +TAO_NotifyPublish_i::~TAO_NotifyPublish_i (void) +{ +} + +void TAO_NotifyPublish_i::offer_change ( + const CosNotification::EventTypeSeq & added, + const CosNotification::EventTypeSeq & removed, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyComm::InvalidEventType + )) +{ + //Add your implementation here +} diff --git a/TAO/orbsvcs/orbsvcs/Notify/NotifyPublish_i.h b/TAO/orbsvcs/orbsvcs/Notify/NotifyPublish_i.h new file mode 100644 index 00000000000..1f9fc6ce117 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/NotifyPublish_i.h @@ -0,0 +1,55 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// NotifyPublish_i.h +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef NOTIFYPUBLISH_I_H +#define NOTIFYPUBLISH_I_H + +#include "orbsvcs/orbsvcs/CosNotifyCommS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class TAO_NotifyPublish_i : +public virtual POA_CosNotifyComm::NotifyPublish +{ +public: + // = TITLE + // TAO_NotifyPublish_i + // = DESCRIPTION + // + // + + TAO_NotifyPublish_i (void); + // Constructor + + virtual ~TAO_NotifyPublish_i (void); + // Destructor + +virtual void offer_change ( + const CosNotification::EventTypeSeq & added, + const CosNotification::EventTypeSeq & removed, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyComm::InvalidEventType + )); +}; + +#endif /* NOTIFYPUBLISH_I_H */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/NotifySubscribe_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/NotifySubscribe_i.cpp new file mode 100644 index 00000000000..1639f3d6e18 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/NotifySubscribe_i.cpp @@ -0,0 +1,25 @@ +/* -*- C++ -*- $Id$ */ +#include "orbsvcs/orbsvcs/Notify/NotifySubscribe_i.h" + +// Implementation skeleton constructor +TAO_NotifySubscribe_i::TAO_NotifySubscribe_i (void) +{ +} + +// Implementation skeleton destructor +TAO_NotifySubscribe_i::~TAO_NotifySubscribe_i (void) +{ +} + +void TAO_NotifySubscribe_i::subscription_change ( + const CosNotification::EventTypeSeq & added, + const CosNotification::EventTypeSeq & removed, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyComm::InvalidEventType + )) +{ + //Add your implementation here +} diff --git a/TAO/orbsvcs/orbsvcs/Notify/NotifySubscribe_i.h b/TAO/orbsvcs/orbsvcs/Notify/NotifySubscribe_i.h new file mode 100644 index 00000000000..f6ac762e95e --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/NotifySubscribe_i.h @@ -0,0 +1,51 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// NotifySubscribe_i.h +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef NOTIFYSUBSCRIBE_H +#define NOTIFYSUBSCRIBE_H + +#include "orbsvcs/orbsvcs/CosNotifyCommS.h" + +class TAO_NotifySubscribe_i : public virtual POA_CosNotifyComm::NotifySubscribe +{ + // = TITLE + // TAO_NotifySubscribe_i + // = DESCRIPTION + // + // + +public: + //Constructor + TAO_NotifySubscribe_i (void); + + //Destructor + virtual ~TAO_NotifySubscribe_i (void); + +virtual void subscription_change ( + const CosNotification::EventTypeSeq & added, + const CosNotification::EventTypeSeq & removed, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyComm::InvalidEventType + )); + +}; + +#endif /* NOTIFYSUBSCRIBE_H */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.cpp new file mode 100644 index 00000000000..5b069fb27ef --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.cpp @@ -0,0 +1,270 @@ +/* -*- C++ -*- $Id$ */ + +#include "orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.h" +#include "ace/Auto_Ptr.h" + +// Implementation skeleton constructor +TAO_Notify_ConsumerAdmin_i::TAO_Notify_ConsumerAdmin_i (TAO_Notify_EventChannel_i& myChannel) + :myChannel_ (myChannel) +{ +} + +// Implementation skeleton destructor +TAO_Notify_ConsumerAdmin_i::~TAO_Notify_ConsumerAdmin_i (void) +{ +} + +void +TAO_Notify_ConsumerAdmin_i::init (CORBA::Environment &ACE_TRY_ENV) +{ + dispatcher_ = auto_ptr(TAO_Notify_Dispatcher::create (ACE_TRY_ENV)); + ACE_CHECK; +} + +TAO_Notify_Dispatcher& +TAO_Notify_ConsumerAdmin_i::get_dispatcher (void) +{ + return *dispatcher_; +} + +CosNotifyChannelAdmin::ConsumerAdmin_ptr +TAO_Notify_ConsumerAdmin_i::get_ref (CORBA::Environment &ACE_TRY_ENV) +{ + CosNotifyChannelAdmin::ConsumerAdmin_var consumeradmin = + _this (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::ConsumerAdmin::_nil ()); + + return consumeradmin._retn (); +} + +CosNotifyChannelAdmin::AdminID TAO_Notify_ConsumerAdmin_i::MyID ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::EventChannel_ptr TAO_Notify_ConsumerAdmin_i::MyChannel ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::InterFilterGroupOperator TAO_Notify_ConsumerAdmin_i::MyOperator ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return myOperator_; + } + +CosNotifyFilter::MappingFilter_ptr TAO_Notify_ConsumerAdmin_i::priority_filter ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +void TAO_Notify_ConsumerAdmin_i::priority_filter ( + CosNotifyFilter::MappingFilter_ptr priority_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + } + +CosNotifyFilter::MappingFilter_ptr TAO_Notify_ConsumerAdmin_i::lifetime_filter ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +void TAO_Notify_ConsumerAdmin_i::lifetime_filter ( + CosNotifyFilter::MappingFilter_ptr lifetime_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + } + +CosNotifyChannelAdmin::ProxyIDSeq * TAO_Notify_ConsumerAdmin_i::pull_suppliers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::ProxyIDSeq* TAO_Notify_ConsumerAdmin_i::push_suppliers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::ProxySupplier_ptr TAO_Notify_ConsumerAdmin_i::get_proxy_supplier ( + CosNotifyChannelAdmin::ProxyID proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::ProxyNotFound + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::ProxySupplier_ptr TAO_Notify_ConsumerAdmin_i::obtain_notification_pull_supplier ( + CosNotifyChannelAdmin::ClientType ctype, + CosNotifyChannelAdmin::ProxyID_out proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminLimitExceeded + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::ProxySupplier_ptr +TAO_Notify_ConsumerAdmin_i::obtain_notification_push_supplier ( + CosNotifyChannelAdmin::ClientType ctype, + CosNotifyChannelAdmin::ProxyID_out proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminLimitExceeded + )) + { + //Add your implementation here + CosNotifyChannelAdmin::ProxySupplier_var proxysupplier_ret; + CORBA::Object_var obj; + + switch (ctype) + { + case CosNotifyChannelAdmin::ANY_EVENT: + { + TAO_Notify_ProxyPushSupplier_i* proxypushsupplier; + ACE_NEW_THROW_EX (proxypushsupplier, + TAO_Notify_ProxyPushSupplier_i (*this), + CORBA::NO_MEMORY ()); + auto_ptr + auto_proxypushsupp (proxypushsupplier); + + proxypushsupplier->init (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxySupplier::_nil ()); + + dispatcher_->add_dispatcher (*proxypushsupplier); + // @@ check ret val. + + obj = proxypushsupplier->get_ref (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxySupplier::_nil ()); + + proxysupplier_ret = + CosNotifyChannelAdmin::ProxySupplier::_narrow (obj.in (), + ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxySupplier::_nil ()); + obj._retn (); // giveup ownership. + + proxy_id = proxy_supplier_ids.get (); + + if (proxypushsupplier_map_.bind (proxy_id, + proxypushsupplier) == -1) + ACE_THROW_RETURN (CORBA::INTERNAL (), + CosNotifyChannelAdmin::ProxySupplier::_nil ()); + auto_proxypushsupp.release (); + } + break; + case CosNotifyChannelAdmin::STRUCTURED_EVENT: + break; + case CosNotifyChannelAdmin::SEQUENCE_EVENT: + break; + default: + break; + } + + return proxysupplier_ret._retn (); + } + +void TAO_Notify_ConsumerAdmin_i::destroy ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + } + +CosEventChannelAdmin::ProxyPushSupplier_ptr +TAO_Notify_ConsumerAdmin_i::obtain_push_supplier ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) +{ + return 0; +} + +CosEventChannelAdmin::ProxyPullSupplier_ptr +TAO_Notify_ConsumerAdmin_i::obtain_pull_supplier ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) +{ + return 0; +} diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h new file mode 100644 index 00000000000..b6e808c5fbb --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h @@ -0,0 +1,197 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// Notify_ConsumerAdmin_i.h +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#include "orbsvcs/orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/NotifySubscribe_i.h" +#include "orbsvcs/orbsvcs/Notify/ID_Pool_T.h" +#include "ace/Hash_Map_Manager.h" + +#include "ace/Auto_Ptr.h" +#include "Notify_Dispatcher.h" + +class TAO_Notify_EventChannel_i; +class TAO_Notify_ProxyPushSupplier_i; + +class TAO_Notify_ConsumerAdmin_i : +public virtual POA_CosNotifyChannelAdmin::ConsumerAdmin, +public virtual TAO_Notify_QoSAdmin_i, +public virtual TAO_NotifySubscribe_i, +public virtual TAO_Notify_FilterAdmin_i +{ + // = TITLE + // TAO_Notify_ConsumerAdmin_i + // = DESCRIPTION + // + // + +public: + TAO_Notify_ConsumerAdmin_i (TAO_Notify_EventChannel_i& myChannel); + // CosNotifyChannelAdmin::AdminID myID) + // Constructor + + virtual ~TAO_Notify_ConsumerAdmin_i (void); + // Destructor + + void init (CORBA::Environment &ACE_TRY_ENV); + // + + TAO_Notify_Dispatcher& get_dispatcher (void); + // + + CosNotifyChannelAdmin::ConsumerAdmin_ptr get_ref (CORBA::Environment &ACE_TRY_ENV); + // + + virtual CosNotifyChannelAdmin::AdminID MyID ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyChannelAdmin::EventChannel_ptr MyChannel ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyChannelAdmin::InterFilterGroupOperator MyOperator ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyFilter::MappingFilter_ptr priority_filter ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void priority_filter ( + CosNotifyFilter::MappingFilter_ptr priority_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyFilter::MappingFilter_ptr lifetime_filter ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void lifetime_filter ( + CosNotifyFilter::MappingFilter_ptr lifetime_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyChannelAdmin::ProxyIDSeq * pull_suppliers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyChannelAdmin::ProxyIDSeq * push_suppliers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyChannelAdmin::ProxySupplier_ptr get_proxy_supplier ( + CosNotifyChannelAdmin::ProxyID proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::ProxyNotFound + )); + + virtual CosNotifyChannelAdmin::ProxySupplier_ptr obtain_notification_pull_supplier ( + CosNotifyChannelAdmin::ClientType ctype, + CosNotifyChannelAdmin::ProxyID_out proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminLimitExceeded + )); + +virtual CosNotifyChannelAdmin::ProxySupplier_ptr obtain_notification_push_supplier ( + CosNotifyChannelAdmin::ClientType ctype, + CosNotifyChannelAdmin::ProxyID_out proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminLimitExceeded + )); + +virtual void destroy ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + // = CosEventChannelAdmin::ConsumerAdmin methods +virtual CosEventChannelAdmin::ProxyPushSupplier_ptr obtain_push_supplier ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosEventChannelAdmin::ProxyPullSupplier_ptr obtain_pull_supplier ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +protected: + CosNotifyChannelAdmin::InterFilterGroupOperator myOperator_; + // + + TAO_Notify_EventChannel_i& myChannel_; + // The channel to which we belong. + + CosNotifyChannelAdmin::AdminID myID_; + // My ID. + + ID_Pool proxy_supplier_ids; + // Id generator for proxy suppliers. + + ACE_Hash_Map_Manager + proxypushsupplier_map_; + + auto_ptr dispatcher_; + // +}; diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Dispatcher.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_Dispatcher.cpp new file mode 100644 index 00000000000..886ae0b6145 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Dispatcher.cpp @@ -0,0 +1,50 @@ +/* -*- C++ -*- $Id$ */ + +#include "Notify_Dispatcher.h" +#include "ace/CORBA_macros.h" +#include "orbsvcs/orbsvcs/CosNotifyCommC.h" // i get some errors with env otherwise + +TAO_Notify_Dispatcher* +TAO_Notify_Dispatcher::create (CORBA::Environment &ACE_TRY_ENV) +{ + // just return the reactive dispatcher for now. + // TODO: use the service configurator to allow the user to specify + // which dispatcher to use and where. + // @@ Should we have a factory instead? + // + TAO_Notify_Dispatcher* dispatcher; + ACE_NEW_THROW_EX (dispatcher, + Notify_Reactive_Dispatcher (), + CORBA::NO_MEMORY()); + return dispatcher; +} + +int +TAO_Notify_Dispatcher::add_dispatcher (TAO_Notify_Dispatcher& dispatcher) +{ + return contained_.insert (&dispatcher); +} + +int +TAO_Notify_Dispatcher::remove_dispatcher (TAO_Notify_Dispatcher& dispatcher) +{ + return contained_.remove (&dispatcher); +} + +void +Notify_Reactive_Dispatcher::dispatch_event (const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV) +{ + // TODO: Filtering comes here.. + + DISPATCHER_SET_ITER iter (contained_); + TAO_Notify_Dispatcher **p_dispatcher; + + for (iter.first ();iter.done () != 1;iter.advance ()) + { + if (iter.next (p_dispatcher) == 0) + break; + (*p_dispatcher)->dispatch_event (data, ACE_TRY_ENV); + ACE_CHECK; + } +} diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Dispatcher.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_Dispatcher.h new file mode 100644 index 00000000000..379095b3928 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Dispatcher.h @@ -0,0 +1,69 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// Notify_Dispatcher.h +// +// = DESCRIPTION +// Various dispatching strategies are defined here. +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef NOTIFY_DISPATCHER_H_ +#define NOTIFY_DISPATCHER_H_ + +#include "ace/Containers.h" +#include "tao/corbafwd.h" + +class TAO_Notify_Dispatcher +{ + // = TITLE + // TAO_Notify_Dispatcher + // = DESCRIPTION + // This is a base class for for different kinds of dispatching schemes. + // Dispatchers will have an internel criteria which will determine *if* + // (i,e. filtering) and *when* (i,e. qos) events will be forwarded to + // contained Dispatchers. + + public: + static TAO_Notify_Dispatcher* create (CORBA::Environment &ACE_TRY_ENV); + // Factory method to create dispatchers of various types. + + virtual void dispatch_event (const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV) = 0; + // Clients of this class should call this method to dispatch events. + + int add_dispatcher (TAO_Notify_Dispatcher& dispatcher); + // Add a dispatcher to an internal list of event recipients. + + int remove_dispatcher (TAO_Notify_Dispatcher& dispatcher); + //Remove a dispatcher from the internal list. + + protected: + typedef ACE_Unbounded_Set DISPATCHER_SET; + typedef ACE_Unbounded_Set_Iterator + DISPATCHER_SET_ITER; + + DISPATCHER_SET contained_; + // Dispatchers forward events to their "contained" dispatchers. +}; + +class Notify_Reactive_Dispatcher : public TAO_Notify_Dispatcher +{ + // = TITLE + // + // = DESCRIPTION + // Simplest dispatcher - dispatches event in the callers thread. + // + virtual void dispatch_event (const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV); +}; + +#endif /* NOTIFY_DISPATCHER_H_ */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.cpp new file mode 100644 index 00000000000..a966979c13c --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.cpp @@ -0,0 +1,90 @@ +/* -*- C++ -*- $Id$ */ +#include "Notify_EventChannelFactory_i.h" +#include "Notify_EventChannel_i.h" +#include "ace/Auto_Ptr.h" + +// Implementation skeleton constructor +TAO_Notify_EventChannelFactory_i::TAO_Notify_EventChannelFactory_i (void) + { + } + +// Implementation skeleton destructor +TAO_Notify_EventChannelFactory_i::~TAO_Notify_EventChannelFactory_i (void) + { + } + +void +TAO_Notify_EventChannelFactory_i::activate (CORBA::Environment &ACE_TRY_ENV) +{ + this->self_ = _this (ACE_TRY_ENV); + ACE_CHECK; +} + +CosNotifyChannelAdmin::EventChannelFactory_ptr +TAO_Notify_EventChannelFactory_i::get_refx (CORBA::Environment &ACE_TRY_ENV) +{ + return _this (ACE_TRY_ENV); +} + +CosNotifyChannelAdmin::EventChannel_ptr +TAO_Notify_EventChannelFactory_i::create_channel +( + const CosNotification::QoSProperties & initial_qos, + const CosNotification::AdminProperties & initial_admin, + CosNotifyChannelAdmin::ChannelID_out id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS, + CosNotification::UnsupportedAdmin + )) + { + // TODO: Check initial_qos + // TODO: check initial_admin + // TODO: fill in id + + TAO_Notify_EventChannel_i* channel; + CosNotifyChannelAdmin::EventChannel_var ec_ret; + + ACE_NEW_THROW_EX (channel, + TAO_Notify_EventChannel_i (*this), + CORBA::NO_MEMORY ()); + + auto_ptr auto_channel (channel); + + channel->init (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil ()); + + ec_ret = channel->get_ref (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil ()); + + auto_channel.release (); + return ec_ret._retn (); + } + +CosNotifyChannelAdmin::ChannelIDSeq * TAO_Notify_EventChannelFactory_i::get_all_channels ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::EventChannel_ptr TAO_Notify_EventChannelFactory_i::get_event_channel ( + CosNotifyChannelAdmin::ChannelID id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::ChannelNotFound + )) + + { + //Add your implementation here + return 0; + } diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.h new file mode 100644 index 00000000000..22b0220c385 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.h @@ -0,0 +1,84 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef NOTIFY_EVENTCHANNELFACTORY_I_H +#define NOTIFY_EVENTCHANNELFACTORY_I_H + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "orbsvcs/orbsvcs/CosNotifyChannelAdminS.h" + +class TAO_Notify_EventChannelFactory_i : +public virtual POA_CosNotifyChannelAdmin::EventChannelFactory +{ +public: + // = TITLE + // TAO_Notify_EventChannelFactory_i + // = DESCRIPTION + // + // + + TAO_Notify_EventChannelFactory_i (void); + // Constructor + + virtual ~TAO_Notify_EventChannelFactory_i (void); + // Destructor + + void activate (CORBA::Environment &ACE_TRY_ENV); + // Activate the servant in the default POA. + + CosNotifyChannelAdmin::EventChannelFactory_ptr get_refx (CORBA::Environment &ACE_TRY_ENV); + // Transform to object ref. + + // = CosNotifyChannelAdmin::EventChannelFactory methods. + virtual CosNotifyChannelAdmin::EventChannel_ptr create_channel ( + const CosNotification::QoSProperties & initial_qos, + const CosNotification::AdminProperties & initial_admin, + CosNotifyChannelAdmin::ChannelID_out id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS, + CosNotification::UnsupportedAdmin + )); + +virtual CosNotifyChannelAdmin::ChannelIDSeq * get_all_channels ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyChannelAdmin::EventChannel_ptr get_event_channel ( + CosNotifyChannelAdmin::ChannelID id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::ChannelNotFound + )); + + protected: + CosNotifyChannelAdmin::EventChannelFactory_var self_; + // Reference to the CORBA Object associated with this servant. +}; + +#endif /* NOTIFY_EVENTCHANNELFACTORY_I_H */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.cpp new file mode 100644 index 00000000000..bd39951ac7d --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.cpp @@ -0,0 +1,275 @@ +/* -*- C++ -*- $Id$ */ +#include "ace/Auto_Ptr.h" +#include "orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_EventChannelFactory_i.h" + +// Implementation skeleton constructor +TAO_Notify_EventChannel_i::TAO_Notify_EventChannel_i (TAO_Notify_EventChannelFactory_i& my_factory) +:my_factory_ (my_factory) +{ +} + +// Implementation skeleton destructor +TAO_Notify_EventChannel_i::~TAO_Notify_EventChannel_i (void) +{ +} + +void +TAO_Notify_EventChannel_i::init (CORBA::Environment &ACE_TRY_ENV) +{ + // TODO: init data members + dispatcher_ = auto_ptr(TAO_Notify_Dispatcher::create (ACE_TRY_ENV)); + ACE_CHECK; +} + +TAO_Notify_Dispatcher& +TAO_Notify_EventChannel_i::get_dispatcher (void) +{ + return *dispatcher_; +} + +CosNotifyChannelAdmin::EventChannel_ptr +TAO_Notify_EventChannel_i::get_ref (CORBA::Environment &ACE_TRY_ENV) +{ + CosNotifyChannelAdmin::EventChannel_var notify_ec; + + notify_ec = _this (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::EventChannel::_nil ()); + + return notify_ec._retn (); +} + +CosNotifyChannelAdmin::EventChannelFactory_ptr +TAO_Notify_EventChannel_i::MyFactory (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return my_factory_._this (ACE_TRY_ENV); +} + +CosNotifyChannelAdmin::ConsumerAdmin_ptr +TAO_Notify_EventChannel_i::default_consumer_admin (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException + )) +{ + //Add your implementation here + return 0; +} + +CosNotifyChannelAdmin::SupplierAdmin_ptr TAO_Notify_EventChannel_i::default_supplier_admin (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC (( + CORBA::SystemException + )) +{ + //Add your implementation here + return 0; +} + +CosNotifyFilter::FilterFactory_ptr +TAO_Notify_EventChannel_i::default_filter_factory ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + +{ + //Add your implementation here + return 0; +} + +CosNotifyChannelAdmin::ConsumerAdmin_ptr +TAO_Notify_EventChannel_i::new_for_consumers +(CosNotifyChannelAdmin::InterFilterGroupOperator op, + CosNotifyChannelAdmin::AdminID_out id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC (( + CORBA::SystemException + )) +{ + //Add your implementation here + + CosNotifyChannelAdmin::ConsumerAdmin_var consumeradmin_ret; + TAO_Notify_ConsumerAdmin_i* consumer_admin; + + ACE_NEW_THROW_EX (consumer_admin, + TAO_Notify_ConsumerAdmin_i (*this), + CORBA::NO_MEMORY ()); + + auto_ptr auto_consumeradmin (consumer_admin); + + consumer_admin->init (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::ConsumerAdmin::_nil ()); + + dispatcher_->add_dispatcher (consumer_admin->get_dispatcher ()); + // @@ check ret error! + + consumeradmin_ret = consumer_admin->get_ref (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::ConsumerAdmin::_nil ()); + + // Add to the map + id = consumer_admin_ids.get (); + if (consumer_admin_map_.bind (id, + consumer_admin) == -1) + ACE_THROW_RETURN (CORBA::INTERNAL (), + CosNotifyChannelAdmin::ConsumerAdmin::_nil ()); + + auto_consumeradmin.release (); + return consumeradmin_ret._retn (); +} + +CosNotifyChannelAdmin::SupplierAdmin_ptr +TAO_Notify_EventChannel_i::new_for_suppliers ( +CosNotifyChannelAdmin::InterFilterGroupOperator op, +CosNotifyChannelAdmin::AdminID_out id, +CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC (( + CORBA::SystemException + )) +{ + //Add your implementation here + CosNotifyChannelAdmin::SupplierAdmin_var supplieradmin_ret; + TAO_Notify_SupplierAdmin_i* supplier_admin; + + ACE_NEW_THROW_EX (supplier_admin, + TAO_Notify_SupplierAdmin_i (*this), + CORBA::NO_MEMORY ()); + + auto_ptr auto_supplieradmin (supplier_admin); + + supplier_admin->init (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::SupplierAdmin::_nil ()); + + supplieradmin_ret = supplier_admin->get_ref (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::SupplierAdmin::_nil ()); + + // Add to the map + id = supplier_admin_ids.get (); + if (supplier_admin_map_.bind (id, + supplier_admin) == -1) + ACE_THROW_RETURN (CORBA::INTERNAL (), + CosNotifyChannelAdmin::SupplierAdmin::_nil ()); + + auto_supplieradmin.release (); + return supplieradmin_ret._retn (); +} + +CosNotifyChannelAdmin::ConsumerAdmin_ptr +TAO_Notify_EventChannel_i::get_consumeradmin +(CosNotifyChannelAdmin::AdminID id, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminNotFound + )) +{ + TAO_Notify_ConsumerAdmin_i* admin; + + if (consumer_admin_map_.find (id,admin) == -1) + ACE_THROW_RETURN (CosNotifyChannelAdmin::AdminNotFound (), + CosNotifyChannelAdmin::ConsumerAdmin::_nil ()); + + return admin->get_ref (ACE_TRY_ENV); +} + +CosNotifyChannelAdmin::SupplierAdmin_ptr +TAO_Notify_EventChannel_i::get_supplieradmin +(CosNotifyChannelAdmin::AdminID id, CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminNotFound + )) +{ + //Add your implementation here + TAO_Notify_SupplierAdmin_i* admin; + + if (supplier_admin_map_.find (id,admin) == -1) + ACE_THROW_RETURN (CosNotifyChannelAdmin::AdminNotFound (), + CosNotifyChannelAdmin::SupplierAdmin::_nil ()); + + return admin->get_ref (ACE_TRY_ENV); +} + +CosNotifyChannelAdmin::AdminIDSeq * TAO_Notify_EventChannel_i::get_all_consumeradmins ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + +{ + //Add your implementation here + return 0; +} + +CosNotifyChannelAdmin::AdminIDSeq * TAO_Notify_EventChannel_i::get_all_supplieradmins ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + +{ + //Add your implementation here + return 0; +} + +CosNotification::AdminProperties * TAO_Notify_EventChannel_i::get_admin ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + +{ + //Add your implementation here + return 0; +} + +void TAO_Notify_EventChannel_i::set_admin ( + const CosNotification::AdminProperties & admin, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedAdmin + )) + +{ + //Add your implementation here +} + +CosEventChannelAdmin::ConsumerAdmin_ptr TAO_Notify_EventChannel_i::for_consumers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + + CosEventChannelAdmin::SupplierAdmin_ptr TAO_Notify_EventChannel_i::for_suppliers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + + void TAO_Notify_EventChannel_i::destroy ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + } diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h new file mode 100644 index 00000000000..60592d4cad2 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h @@ -0,0 +1,206 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// Notify_EventChannel_i.h +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef NOTIFY_EVENTCHANNEL_I_H_ +#define NOTIFY_EVENTCHANNEL_I_H_ + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include +#include "orbsvcs/orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/ID_Pool_T.h" + +#include "ace/Auto_Ptr.h" +#include "Notify_Dispatcher.h" + +class TAO_Notify_EventChannelFactory_i; +class TAO_Notify_ConsumerAdmin_i; +class TAO_Notify_SupplierAdmin_i; + +class TAO_Notify_EventChannel_i : +public virtual POA_CosNotifyChannelAdmin::EventChannel, +public virtual TAO_Notify_QoSAdmin_i +{ + // = TITLE + // TAO_Notify_EventChannel_i + // = DESCRIPTION + // + // + public: + TAO_Notify_EventChannel_i (TAO_Notify_EventChannelFactory_i& my_factory); + // Constructor + + virtual ~TAO_Notify_EventChannel_i (void); + // Destructor + + void init (CORBA::Environment &ACE_TRY_ENV); + // + + TAO_Notify_Dispatcher& get_dispatcher (void); + // + + CosNotifyChannelAdmin::EventChannel_ptr + get_ref (CORBA::Environment &ACE_TRY_ENV); + // Activate with the default POA + + // = EventChannel methods. + virtual CosNotifyChannelAdmin::EventChannelFactory_ptr MyFactory ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyChannelAdmin::ConsumerAdmin_ptr default_consumer_admin ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyChannelAdmin::SupplierAdmin_ptr default_supplier_admin ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyFilter::FilterFactory_ptr default_filter_factory ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyChannelAdmin::ConsumerAdmin_ptr new_for_consumers ( + CosNotifyChannelAdmin::InterFilterGroupOperator op, + CosNotifyChannelAdmin::AdminID_out id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyChannelAdmin::SupplierAdmin_ptr new_for_suppliers ( + CosNotifyChannelAdmin::InterFilterGroupOperator op, + CosNotifyChannelAdmin::AdminID_out id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyChannelAdmin::ConsumerAdmin_ptr get_consumeradmin ( + CosNotifyChannelAdmin::AdminID id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminNotFound + )); + +virtual CosNotifyChannelAdmin::SupplierAdmin_ptr get_supplieradmin ( + CosNotifyChannelAdmin::AdminID id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminNotFound + )); + +virtual CosNotifyChannelAdmin::AdminIDSeq * get_all_consumeradmins ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyChannelAdmin::AdminIDSeq * get_all_supplieradmins ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotification::AdminProperties * get_admin ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual void set_admin ( + const CosNotification::AdminProperties & admin, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedAdmin + )); + + virtual CosEventChannelAdmin::ConsumerAdmin_ptr for_consumers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosEventChannelAdmin::SupplierAdmin_ptr for_suppliers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void destroy ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + protected: + TAO_Notify_EventChannelFactory_i& my_factory_; + // The factory that created us. + + ID_Pool consumer_admin_ids; + // Id generator for consumer admins. + + ID_Pool supplier_admin_ids; + // Id generator for supplier admins. + + ACE_Hash_Map_Manager + consumer_admin_map_; + // + + ACE_Hash_Map_Manager + supplier_admin_map_; + // + + auto_ptr dispatcher_; + // +}; + +#endif /* NOTIFY_EVENTCHANNEL_I_H_ */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.cpp new file mode 100644 index 00000000000..8612f08abb9 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.cpp @@ -0,0 +1,75 @@ +/* -*- C++ -*- $Id$ */ +#include "orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h" + +// Implementation skeleton constructor +TAO_Notify_FilterAdmin_i::TAO_Notify_FilterAdmin_i (void) + { + } + +// Implementation skeleton destructor +TAO_Notify_FilterAdmin_i::~TAO_Notify_FilterAdmin_i (void) + { + } + +CosNotifyFilter::FilterID TAO_Notify_FilterAdmin_i::add_filter ( + CosNotifyFilter::Filter_ptr new_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +void TAO_Notify_FilterAdmin_i::remove_filter ( + CosNotifyFilter::FilterID filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyFilter::FilterNotFound + )) + + { + //Add your implementation here + } + +CosNotifyFilter::Filter_ptr TAO_Notify_FilterAdmin_i::get_filter ( + CosNotifyFilter::FilterID filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyFilter::FilterNotFound + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyFilter::FilterIDSeq * TAO_Notify_FilterAdmin_i::get_all_filters ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +void TAO_Notify_FilterAdmin_i::remove_all_filters ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + +{ + //Add your implementation here +} diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h new file mode 100644 index 00000000000..fdb0f717ad5 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h @@ -0,0 +1,82 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// Notify_FilterAdmin_i.h +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef NOTIFY_FILTERADMIN_H +#define NOTIFY_FILTERADMIN_H + +#include "orbsvcs/orbsvcs/CosNotifyFilterS.h" + +class TAO_Notify_FilterAdmin_i : +public virtual POA_CosNotifyFilter::FilterAdmin +{ + // = TITLE + // TAO_Notify_FilterAdmin_i + // = DESCRIPTION + // + // + +public: + TAO_Notify_FilterAdmin_i (void); + // Constructor + + virtual ~TAO_Notify_FilterAdmin_i (void); + // Destructor + + virtual CosNotifyFilter::FilterID add_filter ( + CosNotifyFilter::Filter_ptr new_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void remove_filter ( + CosNotifyFilter::FilterID filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyFilter::FilterNotFound + )); + + virtual CosNotifyFilter::Filter_ptr get_filter ( + CosNotifyFilter::FilterID filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyFilter::FilterNotFound + )); + + virtual CosNotifyFilter::FilterIDSeq * get_all_filters ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void remove_all_filters ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +}; + +#endif /* NOTIFY_FILTERADMIN_H */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_i.cpp new file mode 100644 index 00000000000..b9f0118125f --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_i.cpp @@ -0,0 +1,73 @@ +/* -*- C++ -*- $Id$ */ + +#include "orbsvcs/orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h" + +// Implementation skeleton constructor +TAO_Notify_ProxyConsumer_i::TAO_Notify_ProxyConsumer_i +(TAO_Notify_SupplierAdmin_i &myadmin) + :myadmin_ (myadmin) +{ +} + +// Implementation skeleton destructor +TAO_Notify_ProxyConsumer_i::~TAO_Notify_ProxyConsumer_i (void) +{ +} + +void +TAO_Notify_ProxyConsumer_i::init (CORBA::Environment &ACE_TRY_ENV) +{ +} + +CosNotifyChannelAdmin::ProxyType TAO_Notify_ProxyConsumer_i::MyType ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::SupplierAdmin_ptr TAO_Notify_ProxyConsumer_i::MyAdmin ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +CosNotification::EventTypeSeq * TAO_Notify_ProxyConsumer_i::obtain_subscription_types ( + CosNotifyChannelAdmin::ObtainInfoMode mode, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +void TAO_Notify_ProxyConsumer_i::validate_event_qos ( + const CosNotification::QoSProperties & required_qos, + CosNotification::NamedPropertyRangeSeq_out available_qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )) + + { + //Add your implementation here + } diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_i.h new file mode 100644 index 00000000000..c086e8372d4 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_i.h @@ -0,0 +1,85 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// Notify_ProxyConsumer_i.h +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef NOTIFY_PROXYCONSUMER_I_H +#define NOTIFY_PROXYCONSUMER_I_H + +#include "orbsvcs/orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h" + +class TAO_Notify_SupplierAdmin_i; + +class TAO_Notify_ProxyConsumer_i : +public virtual POA_CosNotifyChannelAdmin::ProxyConsumer, + public virtual TAO_Notify_QoSAdmin_i, + public virtual TAO_Notify_FilterAdmin_i +{ + // = TITLE + // TAO_Notify_ProxyConsumer_i + // = DESCRIPTION + // + // + +public: + //Constructor + TAO_Notify_ProxyConsumer_i (TAO_Notify_SupplierAdmin_i &myadmin); + + //Destructor + virtual ~TAO_Notify_ProxyConsumer_i (void); + + void init (CORBA::Environment &ACE_TRY_ENV); + // + + virtual CosNotifyChannelAdmin::ProxyType MyType ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyChannelAdmin::SupplierAdmin_ptr MyAdmin ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotification::EventTypeSeq * obtain_subscription_types ( + CosNotifyChannelAdmin::ObtainInfoMode mode, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual void validate_event_qos ( + const CosNotification::QoSProperties & required_qos, + CosNotification::NamedPropertyRangeSeq_out available_qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )); + +protected: + TAO_Notify_SupplierAdmin_i &myadmin_; + // +}; +#endif /* NOTIFY_PROXYCONSUMER_I_H */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.cpp new file mode 100644 index 00000000000..440b7728468 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.cpp @@ -0,0 +1,57 @@ +/* -*- C++ -*- $Id$ */ + +#include "orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.h" +#include "Notify_SupplierAdmin_i.h" + +// Implementation skeleton constructor +TAO_Notify_ProxyPushConsumer_i::TAO_Notify_ProxyPushConsumer_i +(TAO_Notify_SupplierAdmin_i &supplieradmin) + :TAO_Notify_ProxyConsumer_i (supplieradmin) +{ +} + +// Implementation skeleton destructor +TAO_Notify_ProxyPushConsumer_i::~TAO_Notify_ProxyPushConsumer_i (void) + { + } + +CosNotifyChannelAdmin::ProxyPushConsumer_ptr +TAO_Notify_ProxyPushConsumer_i::get_ref (CORBA::Environment &ACE_TRY_ENV) +{ + return _this (ACE_TRY_ENV); +} + +void TAO_Notify_ProxyPushConsumer_i::connect_any_push_supplier ( + CosEventComm::PushSupplier_ptr push_supplier, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosEventChannelAdmin::AlreadyConnected + )) + { + push_supplier_ = CosEventComm::PushSupplier::_duplicate (push_supplier); + } + +void +TAO_Notify_ProxyPushConsumer_i::push (const CORBA::Any& data, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosEventComm::Disconnected + )) +{ + // Filtering comes here. + myadmin_.get_dispatcher ().dispatch_event (data, ACE_TRY_ENV); + ACE_CHECK; +} + +void +TAO_Notify_ProxyPushConsumer_i::disconnect_push_consumer +(CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC (( + CORBA::SystemException + )) +{ + + } diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.h new file mode 100644 index 00000000000..27e16440d93 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.h @@ -0,0 +1,77 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// Notify_ProxyPushConsumer_i.h +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef NOTIFY_PROXYPUSHCONSUMER_I_H +#define NOTIFY_PROXYPUSHCONSUMER_I_H + +#include "orbsvcs/orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_i.h" +#include "orbsvcs/orbsvcs/Notify/NotifyPublish_i.h" + +class TAO_Notify_ProxyPushConsumer_i : + public virtual POA_CosNotifyChannelAdmin::ProxyPushConsumer, + public virtual TAO_Notify_ProxyConsumer_i, + public virtual TAO_NotifyPublish_i +{ + // = TITLE + // TAO_Notify_ProxyPushConsumer_i + // = DESCRIPTION + // + // + +public: + TAO_Notify_ProxyPushConsumer_i (TAO_Notify_SupplierAdmin_i &supplieradmin); + // Constructor + + virtual ~TAO_Notify_ProxyPushConsumer_i (void); + // Destructor + + CosNotifyChannelAdmin::ProxyPushConsumer_ptr get_ref (CORBA::Environment &ACE_TRY_ENV); + +virtual void connect_any_push_supplier ( + CosEventComm::PushSupplier_ptr push_supplier, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosEventChannelAdmin::AlreadyConnected + )); + + // = CosEventComm::PushConsumer + virtual void push ( + const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosEventComm::Disconnected + )); + +virtual void disconnect_push_consumer ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +protected: + CosEventComm::PushSupplier_var push_supplier_; + // +}; + +#endif /* NOTIFY_PROXYPUSHCONSUMER_I_H */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.cpp new file mode 100644 index 00000000000..62c413ae5a0 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.cpp @@ -0,0 +1,79 @@ +/* -*- C++ -*- $Id$ */ +#include "Notify_ProxyPushSupplier_i.h" + +// Implementation skeleton constructor +TAO_Notify_ProxyPushSupplier_i::TAO_Notify_ProxyPushSupplier_i +(TAO_Notify_ConsumerAdmin_i &consumeradmin) + :TAO_Notify_ProxySupplier_i (consumeradmin) +{ +} + +// Implementation skeleton destructor +TAO_Notify_ProxyPushSupplier_i::~TAO_Notify_ProxyPushSupplier_i (void) +{ +} + +void +TAO_Notify_ProxyPushSupplier_i::dispatch_event (const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV) +{ + // check if it passes filter, disconnected etc. + push_consumer_->push (data, ACE_TRY_ENV); + ACE_CHECK; +} + +CosNotifyChannelAdmin::ProxyPushSupplier_ptr +TAO_Notify_ProxyPushSupplier_i::get_ref (CORBA::Environment &ACE_TRY_ENV) +{ + return _this (ACE_TRY_ENV); +} + +void TAO_Notify_ProxyPushSupplier_i::connect_any_push_consumer ( + CosEventComm::PushConsumer_ptr push_consumer, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosEventChannelAdmin::AlreadyConnected, + CosEventChannelAdmin::TypeError + )) + { + push_consumer_ = CosEventComm::PushConsumer::_duplicate (push_consumer); + //Add your implementation here + } + +void TAO_Notify_ProxyPushSupplier_i::suspend_connection ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::ConnectionAlreadyInactive, + CosNotifyChannelAdmin::NotConnected + )) + + { + //Add your implementation here + } + +void +TAO_Notify_ProxyPushSupplier_i::resume_connection ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::ConnectionAlreadyActive, + CosNotifyChannelAdmin::NotConnected + )) + + { + //Add your implementation here + } + + +void +TAO_Notify_ProxyPushSupplier_i::disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC (( + CORBA::SystemException + )) +{ +} diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.h new file mode 100644 index 00000000000..5462d7e0eeb --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxyPushSupplier_i.h @@ -0,0 +1,89 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// Notify_ProxyPushSupplier_i.h +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== +#ifndef NOTIFY_PROXYPUSHSUPPLIER_I_H +#define NOTIFY_PROXYPUSHSUPPLIER_I_H + +#include "orbsvcs/orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.h" +#include "orbsvcs/orbsvcs/Notify/NotifySubscribe_i.h" + +class TAO_Notify_ConsumerAdmin_i; + +class TAO_Notify_ProxyPushSupplier_i : +public virtual POA_CosNotifyChannelAdmin::ProxyPushSupplier, + public virtual TAO_Notify_ProxySupplier_i, + public virtual TAO_NotifySubscribe_i +{ + // = TITLE + // TAO_Notify_ProxyPushSupplier_i + // = DESCRIPTION + // + // + +public: + //Constructor + TAO_Notify_ProxyPushSupplier_i (TAO_Notify_ConsumerAdmin_i &consumeradmin); + + //Destructor + virtual ~TAO_Notify_ProxyPushSupplier_i (void); + + virtual void dispatch_event (const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV); + // + + CosNotifyChannelAdmin::ProxyPushSupplier_ptr get_ref (CORBA::Environment &ACE_TRY_ENV); + + virtual void connect_any_push_consumer ( + CosEventComm::PushConsumer_ptr push_consumer, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosEventChannelAdmin::AlreadyConnected, + CosEventChannelAdmin::TypeError + )); + +virtual void suspend_connection ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::ConnectionAlreadyInactive, + CosNotifyChannelAdmin::NotConnected + )); + +virtual void resume_connection ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::ConnectionAlreadyActive, + CosNotifyChannelAdmin::NotConnected + )); + + // = CosEventChannelAdmin::PushSupplier methods + virtual void disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + protected: + CosEventComm::PushConsumer_var push_consumer_; +}; + +#endif /* NOTIFY_PROXYPUSHSUPPLIER_I_H */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.cpp new file mode 100644 index 00000000000..b9b0d16b0ce --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.cpp @@ -0,0 +1,120 @@ +/* -*- C++ -*- $Id$ */ +#include "orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_ConsumerAdmin_i.h" + +// Implementation skeleton constructor +TAO_Notify_ProxySupplier_i::TAO_Notify_ProxySupplier_i +(TAO_Notify_ConsumerAdmin_i &myadmin) + :myadmin_(myadmin) +{ +} + +// Implementation skeleton destructor +TAO_Notify_ProxySupplier_i::~TAO_Notify_ProxySupplier_i (void) +{ +} + +void +TAO_Notify_ProxySupplier_i::init (CORBA::Environment &ACE_TRY_ENV) +{ +} + +CosNotifyChannelAdmin::ProxyType TAO_Notify_ProxySupplier_i::MyType ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::ConsumerAdmin_ptr TAO_Notify_ProxySupplier_i::MyAdmin ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyFilter::MappingFilter_ptr TAO_Notify_ProxySupplier_i::priority_filter ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +void TAO_Notify_ProxySupplier_i::priority_filter ( + CosNotifyFilter::MappingFilter_ptr priority_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + } + +CosNotifyFilter::MappingFilter_ptr TAO_Notify_ProxySupplier_i::lifetime_filter ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +void TAO_Notify_ProxySupplier_i::lifetime_filter ( + CosNotifyFilter::MappingFilter_ptr lifetime_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + } + +CosNotification::EventTypeSeq* +TAO_Notify_ProxySupplier_i::obtain_offered_types ( + CosNotifyChannelAdmin::ObtainInfoMode mode, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + + { + //Add your implementation here + return 0; + } + +void TAO_Notify_ProxySupplier_i::validate_event_qos ( + const CosNotification::QoSProperties & required_qos, + CosNotification::NamedPropertyRangeSeq_out available_qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )) + + { + //Add your implementation here + } diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.h new file mode 100644 index 00000000000..77d30f0721f --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_ProxySupplier_i.h @@ -0,0 +1,117 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef TAO_NOTIFY_PROXYSUPPLIER_H +#define TAO_NOTIFY_PROXYSUPPLIER_H + +#include "orbsvcs/orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h" +#include "ace/Auto_Ptr.h" +#include "Notify_Dispatcher.h" + +class TAO_Notify_ConsumerAdmin_i; + +class TAO_Notify_ProxySupplier_i : +public virtual POA_CosNotifyChannelAdmin::ProxySupplier, +public virtual TAO_Notify_QoSAdmin_i, +public virtual TAO_Notify_FilterAdmin_i, +public TAO_Notify_Dispatcher +{ + // = TITLE + // TAO_Notify_ProxySupplier_i + // = DESCRIPTION + // + // + +public: + //Constructor + TAO_Notify_ProxySupplier_i (TAO_Notify_ConsumerAdmin_i &myadmin); + + //Destructor + virtual ~TAO_Notify_ProxySupplier_i (void); + + void init (CORBA::Environment &ACE_TRY_ENV); + // + + virtual CosNotifyChannelAdmin::ProxyType MyType ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyChannelAdmin::ConsumerAdmin_ptr MyAdmin ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyFilter::MappingFilter_ptr priority_filter ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual void priority_filter ( + CosNotifyFilter::MappingFilter_ptr priority_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotifyFilter::MappingFilter_ptr lifetime_filter ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual void lifetime_filter ( + CosNotifyFilter::MappingFilter_ptr lifetime_filter, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosNotification::EventTypeSeq * obtain_offered_types ( + CosNotifyChannelAdmin::ObtainInfoMode mode, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual void validate_event_qos ( + const CosNotification::QoSProperties & required_qos, + CosNotification::NamedPropertyRangeSeq_out available_qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )); +protected: + TAO_Notify_ConsumerAdmin_i &myadmin_; + // +}; +#endif /* TAO_NOTIFY_PROXYSUPPLIER_H */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.cpp new file mode 100644 index 00000000000..b82cdccf3b9 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.cpp @@ -0,0 +1,51 @@ +/* -*- C++ -*- $Id$ */ + +#include "orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h" + +// Implementation skeleton constructor +TAO_Notify_QoSAdmin_i::TAO_Notify_QoSAdmin_i (void) + { + } + +// Implementation skeleton destructor +TAO_Notify_QoSAdmin_i::~TAO_Notify_QoSAdmin_i (void) + { + } + +CosNotification::QoSProperties * TAO_Notify_QoSAdmin_i::get_qos ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + { + //Add your implementation here + return 0; + } + +void TAO_Notify_QoSAdmin_i::set_qos ( + const CosNotification::QoSProperties & qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )) + { + //Add your implementation here + return; + } + +void TAO_Notify_QoSAdmin_i::validate_qos ( + const CosNotification::QoSProperties & required_qos, + CosNotification::NamedPropertyRangeSeq_out available_qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )) + { + //Add your implementation here + return; + } diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h new file mode 100644 index 00000000000..e695e7621d9 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h @@ -0,0 +1,67 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// Notify_QoSAdmin_i.h +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== +#ifndef TAO_NOTIFY_QOSADMIN_I_H +#define TAO_NOTIFY_QOSADMIN_I_H + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "orbsvcs/orbsvcs/CosNotificationS.h" + +class TAO_Notify_QoSAdmin_i : public virtual POA_CosNotification::QoSAdmin +{ + // = TITLE + // TAO_Notify_QoSAdmin_i + // = DESCRIPTION + // + // +public: + TAO_Notify_QoSAdmin_i (void); + // Constructor + + virtual ~TAO_Notify_QoSAdmin_i (void); + // Destructor + + virtual CosNotification::QoSProperties * get_qos ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual void set_qos ( + const CosNotification::QoSProperties & qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )); + + virtual void validate_qos ( + const CosNotification::QoSProperties & required_qos, + CosNotification::NamedPropertyRangeSeq_out available_qos, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotification::UnsupportedQoS + )); +}; +#endif /* TAO_NOTIFY_QOSADMIN_I_H */ diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp new file mode 100644 index 00000000000..294f9a08c55 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.cpp @@ -0,0 +1,210 @@ +/* -*- C++ -*- $Id$ */ + +#include "ace/Auto_Ptr.h" +#include "orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_ProxyPushConsumer_i.h" +#include "Notify_EventChannel_i.h" + +// Implementation skeleton constructor +TAO_Notify_SupplierAdmin_i::TAO_Notify_SupplierAdmin_i (TAO_Notify_EventChannel_i& myChannel) + :myChannel_ (myChannel) +{ +} + +// Implementation skeleton destructor +TAO_Notify_SupplierAdmin_i::~TAO_Notify_SupplierAdmin_i (void) +{ +} + +TAO_Notify_Dispatcher& +TAO_Notify_SupplierAdmin_i::get_dispatcher (void) +{ + return *dispatcher_; +} + +void +TAO_Notify_SupplierAdmin_i::init (CORBA::Environment &ACE_TRY_ENV) +{ + + dispatcher_ = auto_ptr(TAO_Notify_Dispatcher::create (ACE_TRY_ENV)); + ACE_CHECK; + + dispatcher_->add_dispatcher (myChannel_.get_dispatcher ()); +} + +CosNotifyChannelAdmin::SupplierAdmin_ptr +TAO_Notify_SupplierAdmin_i::get_ref (CORBA::Environment &ACE_TRY_ENV) +{ + return _this (ACE_TRY_ENV); +} + +CosNotifyChannelAdmin::AdminID TAO_Notify_SupplierAdmin_i::MyID ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::EventChannel_ptr TAO_Notify_SupplierAdmin_i::MyChannel ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::InterFilterGroupOperator TAO_Notify_SupplierAdmin_i::MyOperator ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + { + //Add your implementation here + return myOperator_; + } + +CosNotifyChannelAdmin::ProxyIDSeq * TAO_Notify_SupplierAdmin_i::pull_consumers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::ProxyIDSeq * TAO_Notify_SupplierAdmin_i::push_consumers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::ProxyConsumer_ptr TAO_Notify_SupplierAdmin_i::get_proxy_consumer ( + CosNotifyChannelAdmin::ProxyID proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::ProxyNotFound + )) + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::ProxyConsumer_ptr TAO_Notify_SupplierAdmin_i::obtain_notification_pull_consumer ( + CosNotifyChannelAdmin::ClientType ctype, + CosNotifyChannelAdmin::ProxyID_out proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminLimitExceeded + )) + + { + //Add your implementation here + return 0; + } + +CosNotifyChannelAdmin::ProxyConsumer_ptr +TAO_Notify_SupplierAdmin_i::obtain_notification_push_consumer ( + CosNotifyChannelAdmin::ClientType ctype, + CosNotifyChannelAdmin::ProxyID_out proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminLimitExceeded + )) + { + //Add your implementation here + CosNotifyChannelAdmin::ProxyConsumer_var proxyconsumer_ret; + CORBA::Object_var obj; + + switch (ctype) + { + case CosNotifyChannelAdmin::ANY_EVENT: + { + TAO_Notify_ProxyPushConsumer_i* proxypushconsumer; + ACE_NEW_THROW_EX (proxypushconsumer, + TAO_Notify_ProxyPushConsumer_i (*this), + CORBA::NO_MEMORY ()); + auto_ptr auto_proxypushcons; + + obj = proxypushconsumer->get_ref (ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxyConsumer::_nil ()); + + proxyconsumer_ret = + CosNotifyChannelAdmin::ProxyConsumer::_narrow (obj.in (), + ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNotifyChannelAdmin::ProxyConsumer::_nil ()); + obj._retn (); // giveup ownership. + + proxy_id = proxy_consumer_ids.get (); + + if (proxypushconsumer_map_.bind (proxy_id, + proxypushconsumer) == -1) + ACE_THROW_RETURN (CORBA::INTERNAL (), + CosNotifyChannelAdmin::ProxyConsumer::_nil ()); + auto_proxypushcons.release (); + } + break; + case CosNotifyChannelAdmin::STRUCTURED_EVENT: + break; + case CosNotifyChannelAdmin::SEQUENCE_EVENT: + break; + default: + break; + } + + return proxyconsumer_ret._retn (); + } + +void TAO_Notify_SupplierAdmin_i::destroy ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) + { + //Add your implementation here + } + +CosEventChannelAdmin::ProxyPushConsumer_ptr +TAO_Notify_SupplierAdmin_i::obtain_push_consumer ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) +{ + // Add your implementation here + return 0; +} + +CosEventChannelAdmin::ProxyPullConsumer_ptr +TAO_Notify_SupplierAdmin_i::obtain_pull_consumer ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) +{ + //Add your implementation here + return 0; +} diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h new file mode 100644 index 00000000000..e4c7c26e49d --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h @@ -0,0 +1,171 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = LIBRARY +// orbsvcs +// +// = FILENAME +// Notify_SupplierAdmin_i.h +// +// = DESCRIPTION +// +// +// = AUTHOR +// Pradeep Gore +// +// ========================================================================== + +#ifndef NOTIFY_SUPPLIERADMIN_I_H +#define NOTIFY_SUPPLIERADMIN_I_H + +#include "orbsvcs/orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/NotifyPublish_i.h" +#include "orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h" +#include "orbsvcs/orbsvcs/Notify/ID_Pool_T.h" +#include "ace/Hash_Map_Manager.h" + +#include "ace/Auto_Ptr.h" +#include "Notify_Dispatcher.h" + +class TAO_Notify_EventChannel_i; +class TAO_Notify_ProxyPushConsumer_i; + +class TAO_Notify_SupplierAdmin_i : + public virtual POA_CosNotifyChannelAdmin::SupplierAdmin, + public virtual TAO_Notify_QoSAdmin_i, + public virtual TAO_NotifyPublish_i, + public virtual TAO_Notify_FilterAdmin_i +{ + // = TITLE + // TAO_Notify_SupplierAdmin_i + // = DESCRIPTION + // + // + +public: + TAO_Notify_SupplierAdmin_i (TAO_Notify_EventChannel_i& myChannel); + // Constructor + + virtual ~TAO_Notify_SupplierAdmin_i (void); + // Destructor + + + void init (CORBA::Environment &ACE_TRY_ENV); + // + + TAO_Notify_Dispatcher& get_dispatcher (void); + // + + CosNotifyChannelAdmin::SupplierAdmin_ptr get_ref (CORBA::Environment &ACE_TRY_ENV); + + virtual CosNotifyChannelAdmin::AdminID MyID ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyChannelAdmin::EventChannel_ptr MyChannel ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyChannelAdmin::InterFilterGroupOperator MyOperator ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyChannelAdmin::ProxyIDSeq * pull_consumers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyChannelAdmin::ProxyIDSeq * push_consumers ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + virtual CosNotifyChannelAdmin::ProxyConsumer_ptr get_proxy_consumer ( + CosNotifyChannelAdmin::ProxyID proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::ProxyNotFound + )); + + virtual CosNotifyChannelAdmin::ProxyConsumer_ptr obtain_notification_pull_consumer ( + CosNotifyChannelAdmin::ClientType ctype, + CosNotifyChannelAdmin::ProxyID_out proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminLimitExceeded + )); + + virtual CosNotifyChannelAdmin::ProxyConsumer_ptr obtain_notification_push_consumer ( + CosNotifyChannelAdmin::ClientType ctype, + CosNotifyChannelAdmin::ProxyID_out proxy_id, + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + CosNotifyChannelAdmin::AdminLimitExceeded + )); + + virtual void destroy ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + + // = CosEventChannelAdmin::SupplierAdmin method +virtual CosEventChannelAdmin::ProxyPushConsumer_ptr obtain_push_consumer ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +virtual CosEventChannelAdmin::ProxyPullConsumer_ptr obtain_pull_consumer ( + CORBA::Environment &ACE_TRY_ENV + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + +protected: + CosNotifyChannelAdmin::InterFilterGroupOperator myOperator_; + // + + TAO_Notify_EventChannel_i& myChannel_; + // The channel to which we belong. + + CosNotifyChannelAdmin::AdminID myID_; + // My ID. + + ID_Pool proxy_consumer_ids; + // Id generator for proxy suppliers. + + ACE_Hash_Map_Manager + proxypushconsumer_map_; + + auto_ptr dispatcher_; + // +}; + +#endif /* NOTIFY_SUPPLIERADMIN_I_H */ -- cgit v1.2.1