summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Notify_Event_Dispatch_Command.cpp
blob: 1c4d8d15f7b5dd0ae0f23382470be48002ec2939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// $Id$

#include "Notify_Event_Dispatch_Command.h"
#include "Notify_Listeners.h"
#include "Notify_Event.h"

ACE_RCSID(Notify, TAO_Notify_Event_Dispatch_Command, "$Id$")

TAO_Notify_Event_Dispatch_Command::TAO_Notify_Event_Dispatch_Command (TAO_Notify_Event* event, TAO_Notify_EventListener* event_listener)
  :event_ (event),
   event_listener_ (event_listener)
{
  event_listener_->_incr_refcnt ();
  this->event_->_incr_refcnt ();
}

TAO_Notify_Event_Dispatch_Command::~TAO_Notify_Event_Dispatch_Command ()
{
  ACE_DEBUG ((LM_DEBUG, "in ~TAO_Notify_Event_Dispatch_Command\n"));
  event_listener_->_decr_refcnt ();
  this->event_->_decr_refcnt ();
}

int
TAO_Notify_Event_Dispatch_Command::execute (TAO_Notify_Worker_Task* /*parent_task*/, CORBA::Environment& ACE_TRY_ENV)
{
  this->event_listener_->dispatch_event (*this->event_, ACE_TRY_ENV);
  ACE_CHECK_RETURN (-1);

  return 0;
}