summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Event/EC_TPC_ProxyConsumer.cpp
blob: d7e822edf0a3bbbe237bc9f156a676a44ceeea53 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
// $Id$

#include "EC_TPC_ProxyConsumer.h"

ACE_RCSID(Event, EC_TPC_ProxyConsumer, "$Id$")

#include "EC_Event_Channel_Base.h"
#include "EC_TPC_Dispatching.h"

extern unsigned long EC_TPC_debug_level;

TAO_EC_TPC_ProxyPushConsumer::TAO_EC_TPC_ProxyPushConsumer (TAO_EC_Event_Channel_Base* ec)
: TAO_EC_Default_ProxyPushConsumer (ec)
{
}

TAO_EC_TPC_Dispatching*
TAO_EC_TPC_ProxyPushConsumer::tpc_dispatching ()
{
  TAO_EC_Dispatching* dispatcher = this->event_channel_->dispatching ();
  TAO_EC_TPC_Dispatching* tpcdispatcher =
    dynamic_cast<TAO_EC_TPC_Dispatching*>(dispatcher);
  return tpcdispatcher;  
}

TAO_EC_TPC_ProxyPushConsumer::~TAO_EC_TPC_ProxyPushConsumer (void)
{
  // @@@ Do I need to call the logic to remove the consumer from the
  // dispatch map in here?  I'm not sure...  But, if I do, then I need
  // to fact that "remove" code out of just the
  // disconnect_push_consumer.
  if (EC_TPC_debug_level > 0)
    ACE_DEBUG ((LM_DEBUG, "RTEC (%P|%t): inside ~TAO_EC_TPC_ProxyPushConsumer (%x)\n", this));
}

void
TAO_EC_TPC_ProxyPushConsumer::disconnect_push_consumer (
      ACE_ENV_SINGLE_ARG_DECL)
    ACE_THROW_SPEC ((CORBA::SystemException))
{
  this->tpc_dispatching ()->remove_consumer (this->_this(ACE_ENV_SINGLE_ARG_PARAMETER)
                                             ACE_ENV_ARG_PARAMETER);
  BASECLASS::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER);
}