blob: 34caef244514fc5a2f079ddf04f0d6ef6edc3045 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
// $Id$
#include "orbsvcs/Log_Macros.h"
#include "orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.h"
#include "tao/debug.h"
#include "orbsvcs/Notify/Any/PushConsumer.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_Notify_CosEC_ProxyPushSupplier::TAO_Notify_CosEC_ProxyPushSupplier (void)
{
}
TAO_Notify_CosEC_ProxyPushSupplier::~TAO_Notify_CosEC_ProxyPushSupplier ()
{
}
void
TAO_Notify_CosEC_ProxyPushSupplier::release (void)
{
delete this;
//@@ inform factory
}
void
TAO_Notify_CosEC_ProxyPushSupplier::connect_push_consumer (CosEventComm::PushConsumer_ptr push_consumer)
{
// Convert Consumer to Base Type
TAO_Notify_PushConsumer* consumer;
ACE_NEW_THROW_EX (consumer,
TAO_Notify_PushConsumer (this),
CORBA::NO_MEMORY ());
consumer->init (push_consumer);
this->connect (consumer);
}
void
TAO_Notify_CosEC_ProxyPushSupplier::disconnect_push_supplier (void)
{
TAO_Notify_CosEC_ProxyPushSupplier::Ptr guard( this );
this->destroy ();
}
const char *
TAO_Notify_CosEC_ProxyPushSupplier::get_proxy_type_name (void) const
{
return "ec_proxy_push_supplier";
}
void
TAO_Notify_CosEC_ProxyPushSupplier::validate ()
{
TAO_Notify_Consumer* con = this->consumer ();
if (con != 0 && ! con->is_alive (true))
{
if (TAO_debug_level > 0)
{
ORBSVCS_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t) TAO_Notify_CosEC_ProxyPushSupplier::validate(%d)")
ACE_TEXT ("disconnecting \n"), this->id ()));
}
this->disconnect_push_supplier ();
}
}
void
TAO_Notify_CosEC_ProxyPushSupplier::configure(
TAO_Notify_ConsumerAdmin & /*admin*/,
CosNotifyChannelAdmin::ProxyID_out /*proxy_id*/)
{
// Nothing to do.
// This virtual method was added to support Notification MC
}
TAO_END_VERSIONED_NAMESPACE_DECL
|