diff options
Diffstat (limited to 'TAO/CIAO/ciaosvcs/Events/CIAO_EventServiceBase.h')
-rw-r--r-- | TAO/CIAO/ciaosvcs/Events/CIAO_EventServiceBase.h | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/TAO/CIAO/ciaosvcs/Events/CIAO_EventServiceBase.h b/TAO/CIAO/ciaosvcs/Events/CIAO_EventServiceBase.h new file mode 100644 index 00000000000..ea9fe669704 --- /dev/null +++ b/TAO/CIAO/ciaosvcs/Events/CIAO_EventServiceBase.h @@ -0,0 +1,116 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file CIAO_EventServiceBase.h + * + * $Id$ + * + * @author Gan Deng <dengg@dre.vanderbilt.edu> + * @author George Edwards <g.edwards@vanderbilt.edu> + */ +//============================================================================= + +#ifndef CIAO_EVENTSERVICEBASE_H +#define CIAO_EVENTSERVICEBASE_H +#include /**/ "ace/pre.h" + +#include "CIAO_EventsS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +namespace CIAO +{ + /** + * @class EventServiceBase + * + * An abstract base servant class to implement the CIAO_Event_Service + * interface. The derived classes will provide appropriate + * implementations of the connect, disconnect, and push methods depending on + * the event mechanism used. + */ + class CIAO_EVENTS_Export EventServiceBase : + public virtual POA_CIAO::CIAO_Event_Service + { + public: + EventServiceBase (void); + + virtual ~EventServiceBase (void); + + /// A factory method for Supplier_Config objects + virtual Supplier_Config_ptr + create_supplier_config (void) + ACE_THROW_SPEC ((CORBA::SystemException)) = 0; + + /// A factory method for Consumer_Config objects + virtual Consumer_Config_ptr + create_consumer_config (void) + ACE_THROW_SPEC ((CORBA::SystemException)) = 0; + + /** + * @fn void connect_event_supplier (Supplier_Config_ptr supplier_config) + * + * Connects an event supplier using the options specified by + * @c supplier_config. + */ + virtual void connect_event_supplier ( + Supplier_Config_ptr supplier_config + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + CORBA::SystemException)) = 0; + + /** + * @fn void connect_event_consumer (Consumer_Config_ptr consumer_config) + * + * Connects an event consumer using the options specified by + * @c consumer_config. + */ + virtual void connect_event_consumer ( + Consumer_Config_ptr consumer_config + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + CORBA::SystemException)) = 0; + + /** + * @fn void disconnect_event_supplier () + * + * Disconnects the event supplier associated with this object. + */ + virtual void disconnect_event_supplier ( + const char * consumer_id + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + CORBA::SystemException, + Components::InvalidName, + Components::InvalidConnection)) = 0; + + /** + * @fn void disconnect_event_consumer (CONNECTION_ID consumer_id) + * + * Disconnects the event consumer with UUID @c consumer_id. + */ + virtual void disconnect_event_consumer ( + const char * consumer_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + CORBA::SystemException, + Components::InvalidName, + Components::InvalidConnection)) = 0; + + /** + * @fn void push_event (Components::EventBase * ev) + * + * Pushes event @c ev to all consumers. + */ + virtual void push_event ( + Components::EventBase * ev + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + CORBA::SystemException)) = 0; + }; +} + +#include /**/ "ace/post.h" +#endif /* CIAO_EVENTSERVICEBASE_H */ |