blob: 2661a54453c55ccfe015794b33507c1362755ce2 (
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
// -*- C++ -*-
//
// $Id$
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
TAO::CSD::TP_Request::TP_Request(PortableServer::Servant servant,
TP_Servant_State* servant_state)
: prev_(0),
next_(0),
servant_ (servant),
servant_state_(servant_state, false)
{
this->servant_->_add_ref ();
}
ACE_INLINE
void
TAO::CSD::TP_Request::prepare_for_queue()
{
this->prepare_for_queue_i();
}
ACE_INLINE
PortableServer::Servant
TAO::CSD::TP_Request::servant()
{
// Used for chaining so we do not return a new "copy".
return this->servant_.in();
}
ACE_INLINE
bool
TAO::CSD::TP_Request::is_ready() const
{
if (this->servant_state_.is_nil())
{
// This means that the serialization of servants is off.
// We always answer true here to indicate that the servant is
// never busy.
return true;
}
return !this->servant_state_->busy_flag();
}
ACE_INLINE
void
TAO::CSD::TP_Request::mark_as_busy()
{
if (!this->servant_state_.is_nil())
{
this->servant_state_->busy_flag(true);
}
}
ACE_INLINE
void
TAO::CSD::TP_Request::mark_as_ready()
{
if (!this->servant_state_.is_nil())
{
this->servant_state_->busy_flag(false);
}
}
ACE_INLINE
bool
TAO::CSD::TP_Request::is_target(PortableServer::Servant servant)
{
// Compare pointers. Return true only if these are the exact same object.
return (servant == this->servant_.in());
}
ACE_INLINE
void
TAO::CSD::TP_Request::dispatch()
{
this->dispatch_i();
}
ACE_INLINE
void
TAO::CSD::TP_Request::cancel()
{
this->cancel_i();
}
TAO_END_VERSIONED_NAMESPACE_DECL
|