summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h99
1 files changed, 84 insertions, 15 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h
index c93fffd92a2..c6df6b73aa0 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h
@@ -22,8 +22,10 @@
#include "orbsvcs/CosNotifyChannelAdminS.h"
#include "orbsvcs/NotifyExtS.h"
-
-#include "Object.h"
+#include "Topology_Object.h"
+#include "Topology_Factory.h"
+#include "Reconnection_Registry.h"
+#include "Routing_Slip.h"
class TAO_Notify_EventChannel;
template <class TYPE> class TAO_Notify_Container_T;
@@ -41,11 +43,13 @@ template <class TYPE> class TAO_Notify_Container_T;
* @brief Implementation of CosNotifyChannelAdmin::EventChannelFactory
*
*/
-class TAO_Notify_Serv_Export TAO_Notify_EventChannelFactory
- : public virtual POA_NotifyExt::EventChannelFactory,
- public virtual TAO_Notify_Object
+class TAO_Notify_Serv_Export TAO_Notify_EventChannelFactory
+ : public virtual POA_NotifyExt::EventChannelFactory
+ , public TAO_Notify::Topology_Parent
+
{
friend class TAO_Notify_Builder;
+ typedef ACE_Unbounded_Set <TAO_Notify::Routing_Slip_Ptr> Routing_Slip_Set;
public:
/// Constuctor
@@ -72,11 +76,49 @@ public:
ACE_ENV_SINGLE_ARG_DECL
);
- /// shutdown
- virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
+
+ //////////////////////////
+ // The following methods are for
+ // unit testing and debugging
+
+ /// Use the registered Topology_Factory to create a loader, and
+ /// load the topology. If no Topology_Factory is registered
+ /// then nothing will be loaded.
+ void load_topology (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// Use the passed in saver factory to generate topology saver objects.
+ /// Does not take ownership.
+ void set_topology_factory(TAO_Notify::Topology_Factory* sf);
+
+ //-- Topology_Parent
+
+ virtual bool is_persistent () const;
+
+ virtual void save_persistent (TAO_Notify::Topology_Saver& saver ACE_ENV_ARG_DECL);
+ virtual bool change_to_parent (ACE_ENV_SINGLE_ARG_DECL);
+ virtual TAO_Notify::Topology_Object* load_child (const ACE_CString &type,
+ CORBA::Long id,
+ const TAO_Notify::NVPList& attrs
+ ACE_ENV_ARG_DECL);
+ CosNotifyChannelAdmin::EventChannelFactory_ptr activate_self (ACE_ENV_SINGLE_ARG_DECL);
+ virtual void reconnect (ACE_ENV_SINGLE_ARG_DECL);
+
+ /// handle change notifications
+ bool handle_change (ACE_ENV_SINGLE_ARG_DECL);
+
+ void load_event_persistence (ACE_ENV_SINGLE_ARG_DECL);
+
+ virtual void save_topology (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ TAO_Notify_ProxyConsumer * find_proxy_consumer (TAO_Notify::IdVec & id_path, size_t position ACE_ENV_ARG_DECL);
+ TAO_Notify_ProxySupplier * find_proxy_supplier (TAO_Notify::IdVec & id_path, size_t position ACE_ENV_ARG_DECL);
+ TAO_Notify_Object * follow_id_path (TAO_Notify::IdVec & id_path, size_t position ACE_ENV_ARG_DECL);
+ virtual TAO_Notify_Object::ID get_id () const;
+
protected:
- typedef TAO_Notify_Container_T<TAO_Notify_EventChannel>
+ typedef TAO_Notify_Container_T<TAO_Notify_EventChannel>
TAO_Notify_EventChannel_Container;
/// = Data Members
@@ -86,21 +128,38 @@ public:
/// The default filter factory.
CosNotifyFilter::FilterFactory_var default_filter_factory_;
- /// = NotifyExt method
+ /// = NotifyExt methods
virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
));
+ /// shutdown
+ virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);
+
+ virtual
+ NotifyExt::ReconnectionRegistry::ReconnectionID register_callback (
+ NotifyExt::ReconnectionCallback_ptr reconnection
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void unregister_callback (
+ NotifyExt::ReconnectionRegistry::ReconnectionID id
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Boolean is_alive (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
/// = CosNotifyChannelAdmin Methods
virtual ::CosNotifyChannelAdmin::EventChannel_ptr create_channel (
const CosNotification::QoSProperties & initial_qos,
const CosNotification::AdminProperties & initial_admin,
- CosNotifyChannelAdmin::ChannelID_out id
+ CosNotifyChannelAdmin::ChannelID_out id
ACE_ENV_ARG_DECL
)
- ACE_THROW_SPEC ((CORBA::SystemException,
+ ACE_THROW_SPEC ((CORBA::SystemException,
CosNotification::UnsupportedQoS,
CosNotification::UnsupportedAdmin));
@@ -115,16 +174,26 @@ public:
)
ACE_THROW_SPEC ((CORBA::SystemException,
CosNotifyChannelAdmin::ChannelNotFound));
+
+private:
+ TAO_SYNCH_MUTEX topology_save_lock_;
+
+ CosNotifyChannelAdmin::EventChannelFactory_var channel_factory_;
+
+ /// change-in-progress detector to avoid duplicates
+ short topology_save_seq_;
+ TAO_Notify::Topology_Factory* topology_factory_;
+ TAO_Notify::Reconnection_Registry reconnect_registry_;
+ bool loading_topology_;
+
+ Routing_Slip_Set routing_slip_restart_set_;
+
};
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma warning(pop)
#endif /* _MSC_VER */
-#if defined (__ACE_INLINE__)
-#include "EventChannelFactory.inl"
-#endif /* __ACE_INLINE__ */
-
#include /**/ "ace/post.h"
#endif /* TAO_Notify_EVENTCHANNELFACTORY_H */