summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify/lib/Direct_Supplier.h
blob: cf913471ff19d6129884cd4dd76fc86435f536f2 (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
/* -*- C++ -*- */
/**
 *  @file Direct_Supplier.h
 *
 *  $Id$
 *
 *  @author Pradeep Gore <pradeep@oomworks.com>
 *
 *
 */

#ifndef TAO_NS_DIRECT_SUPPLIER_H
#define TAO_NS_DIRECT_SUPPLIER_H
#include "ace/pre.h"

#include "notify_test_export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "Periodic_Supplier.h"

/**
 * @class TAO_NS_Direct_Supplier
 *
 * @brief Send Directly to a consumer.
 *
 */
class TAO_NOTIFY_TEST_Export TAO_NS_Direct_Supplier : public TAO_NS_Periodic_Supplier
{
public:
  /// Constuctor
  TAO_NS_Direct_Supplier (ACE_CString& target);

  /// Destructor
  ~TAO_NS_Direct_Supplier ();

  /// Connect using options parsed and set initial QoS.
  virtual void connect (ACE_ENV_SINGLE_ARG_DECL);

  // Send one event. Bypass sending to the Notify and send directly to taget consumer.
  virtual void send_event (const CosNotification::StructuredEvent& event
                           ACE_ENV_ARG_DECL);

protected:
  /// Target object.
  ACE_CString target_;

  /// This object is resolved in the connect method.
  CosNotifyComm::StructuredPushConsumer_var target_object_;
};

#if defined (__ACE_INLINE__)
#include "Direct_Supplier.inl"
#endif /* __ACE_INLINE__ */

#include "ace/post.h"
#endif /* TAO_NS_DIRECT_SUPPLIER_H */