Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 3.47 KB

domainParticipantListener.rst

File metadata and controls

65 lines (47 loc) · 3.47 KB

DomainParticipantListener

|DomainParticipantListener-api| is an abstract class defining the callbacks that will be triggered in response to state changes on the :ref:`dds_layer_domainParticipant`. By default, all these callbacks are empty and do nothing. The user should implement a specialization of this class overriding the callbacks that are needed on the application. Callbacks that are not overridden will maintain their empty implementation.

DomainParticipantListener inherits from :ref:`dds_layer_topic_topicListener`, :ref:`dds_layer_publisher_publisherListener`, and :ref:`dds_layer_subscriber_subscriberListener`. Therefore, it has the ability to react to every kind of event that is reported to any of its attached Entities. Since events are always notified to the most specific Entity Listener that can handle the event, callbacks that DomainParticipantListener inherits from other Listeners will only be called if no other Entity was able to handle the event, either because it has no Listener attached, or because the callback is disabled by the |StatusMask-api| on the Entity.

Additionally, DomainParticipantListener adds the following non-standard callbacks:

Important

For more information about callbacks and its hierarchy, please refer to :ref:`dds_layer_core_entity_commonchars_listener`.

.. literalinclude:: /../code/DDSCodeTester.cpp
   :language: c++
   :start-after: //DDS_DOMAINPARTICIPANT_LISTENER_SPECIALIZATION
   :end-before: //!