ESF_Peer_Admin.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   ESF_Peer_Admin.h
00005  *
00006  *  $Id: ESF_Peer_Admin.h 77001 2007-02-12 07:54:49Z johnnyw $
00007  *
00008  *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
00009  *
00010  *  http://doc.ece.uci.edu/~coryan/EC/index.html
00011  */
00012 
00013 #ifndef TAO_ESF_PEER_ADMIN_H
00014 #define TAO_ESF_PEER_ADMIN_H
00015 
00016 #include "orbsvcs/ESF/ESF_Proxy_Admin.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 # pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00023 
00024 /**
00025  * @class TAO_ESF_Peer_Admin
00026  *
00027  * @brief Extend the Proxy_Admin interface to provide methods for
00028  *        filtering
00029  *
00030  * Some Event Services that perform filtering have to propagate
00031  * the consumer connect/disconnect activities to the suppliers,
00032  * and vice-versa.
00033  * In that scenario the ESF_Proxy_Admin<> interface is augmented
00034  * with connected()/reconnected()/disconnected() operations for
00035  * the proxy peers (i.e. the ProxySuppliers for the ProxyConsumers
00036  * and vice-versa).
00037  *
00038  * <H2>Requirements</H2>
00039  *
00040  * In addition to the requirements imposed by ESF_Proxy_Admin<>
00041  * the PROXY interface must implement:
00042  *
00043  * @verbatim
00044  * void connected (PEER *peer) throw ();
00045  * void reconnected (PEER *peer) throw ();
00046  * void disconnected (PEER *peer) throw ();
00047  * @endverbatim
00048  *
00049  * Similarly, the PEER interface must implement:
00050  *
00051  * @verbatim
00052  * void connected (PROXY *proxy) throw ();
00053  * void reconnected (PROXY *proxy) throw ();
00054  * void disconnected (PROXY *proxy) throw ();
00055  * @endverbatim
00056  */
00057 template<class EVENT_CHANNEL, class PROXY, class INTERFACE, class PEER>
00058 class TAO_ESF_Peer_Admin : public TAO_ESF_Proxy_Admin<EVENT_CHANNEL,PROXY,INTERFACE>
00059 {
00060 public:
00061   /// Constructor
00062   TAO_ESF_Peer_Admin (EVENT_CHANNEL *ec);
00063 
00064   /// destructor
00065   virtual ~TAO_ESF_Peer_Admin (void);
00066 
00067   /**
00068    * A <peer> has connected, this is invoked when the peer's client
00069    * has invoked the connect_xxx_yyy() method.
00070    * The default implementation is a no-op.
00071    */
00072   virtual void peer_connected (PEER *peer);
00073 
00074   /**
00075    * A <peer> has reconnected, i.e. its client has invoked the
00076    * connect_xxx_yyy() method, but the peer was connected already.
00077    * The default implementation delegates on the collection
00078    * <reconnected> method
00079    */
00080   virtual void peer_reconnected (PEER *peer);
00081 
00082   /**
00083    * A <peer> has been disconnected. The default implementation
00084    * removes the object from the collection and deactivates the
00085    * proxy.
00086    */
00087   virtual void peer_disconnected (PEER *peer);
00088 };
00089 
00090 // ****************************************************************
00091 
00092 TAO_END_VERSIONED_NAMESPACE_DECL
00093 
00094 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00095 #include "orbsvcs/ESF/ESF_Peer_Admin.cpp"
00096 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00097 
00098 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00099 #pragma implementation ("ESF_Peer_Admin.cpp")
00100 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00101 
00102 #endif /* TAO_ESF_PEER_ADMIN_H */

Generated on Tue Feb 2 17:43:47 2010 for TAO_ESF by  doxygen 1.4.7