summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Reactive_Task.cpp
blob: 747635dac2c1a13948373ca204b82489661ae841 (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
// $Id$

#include "Reactive_Task.h"

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

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

#include "Timer_Reactor.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

TAO_Notify_Reactive_Task::TAO_Notify_Reactive_Task (void)
  :timer_ (0)
{
}

TAO_Notify_Reactive_Task::~TAO_Notify_Reactive_Task ()
{
}

void
TAO_Notify_Reactive_Task::init (ACE_ENV_SINGLE_ARG_DECL)
{
  ACE_ASSERT (this->timer_.get() == 0);

  TAO_Notify_Timer_Reactor* timer = 0;
  ACE_NEW_THROW_EX (timer,
                    TAO_Notify_Timer_Reactor (),
                    CORBA::NO_MEMORY ());
  this->timer_.reset (timer);
}

void
TAO_Notify_Reactive_Task::release (void)
{
  delete this; //TODO: Release via factory.
}

void
TAO_Notify_Reactive_Task::shutdown (void)
{
}

void
TAO_Notify_Reactive_Task::execute (TAO_Notify_Method_Request& method_request ACE_ENV_ARG_DECL)
{
  method_request.execute (ACE_ENV_SINGLE_ARG_PARAMETER);
}

TAO_Notify_Timer*
TAO_Notify_Reactive_Task::timer (void)
{
  return this->timer_.get();
}

TAO_END_VERSIONED_NAMESPACE_DECL