summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Notify_StructuredProxyPushConsumer_i.cpp
blob: 52cde616a2aa8d64e3404eae2fff24cb08785c5d (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
/* -*- C++ -*- $Id$ */

#include "Notify_StructuredProxyPushConsumer_i.h"
#include "Notify_SupplierAdmin_i.h"
#include "Notify_Dispatcher.h"

TAO_Notify_StructuredProxyPushConsumer_i::TAO_Notify_StructuredProxyPushConsumer_i (TAO_Notify_SupplierAdmin_i &supplieradmin)
  :TAO_Notify_ProxyConsumer_i (supplieradmin)
{
}

TAO_Notify_StructuredProxyPushConsumer_i::~TAO_Notify_StructuredProxyPushConsumer_i (void)
{
}

CosNotifyChannelAdmin::ProxyConsumer_ptr
TAO_Notify_StructuredProxyPushConsumer_i::get_ref (CORBA::Environment &ACE_TRY_ENV)
{
  return _this (ACE_TRY_ENV);
}

void
TAO_Notify_StructuredProxyPushConsumer_i::connect_structured_push_supplier (
    CosNotifyComm::StructuredPushSupplier_ptr push_supplier,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventChannelAdmin::AlreadyConnected
  ))
{
  //@@ incomplete
  push_supplier_ =
    CosNotifyComm::StructuredPushSupplier::_duplicate (push_supplier);
}

void
TAO_Notify_StructuredProxyPushConsumer_i::push_structured_event (
                                                                 const CosNotification::StructuredEvent& event,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventComm::Disconnected
  ))
{
  //@@ Filtering comes here.
  CORBA::Boolean truth =
    this->match_structured (event, ACE_TRY_ENV);
  ACE_CHECK;

  if (truth == 0)
    return; // don't propogate the event further out.

  myadmin_.get_dispatcher ().dispatch_event (event, ACE_TRY_ENV);
  ACE_CHECK;
}

void
TAO_Notify_StructuredProxyPushConsumer_i::disconnect_structured_push_consumer (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
}