summaryrefslogtreecommitdiff
path: root/TAO/tao/Connector_Impl.cpp
blob: 54f60860d4af9266cbeea7ec20c2c14fc7c726f5 (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
#ifndef TAO_CONNECTOR_IMPL_CPP
#define TAO_CONNECTOR_IMPL_CPP

#include "tao/Connector_Impl.h"

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


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

ACE_RCSID(tao, Connector_Impl, "$Id$")


template <class SVC_HANDLER>
TAO_Connect_Creation_Strategy<SVC_HANDLER>::
    TAO_Connect_Creation_Strategy (ACE_Thread_Manager* t,
                                   TAO_ORB_Core *orb_core,
                                   void *arg,
                                   CORBA::Boolean flag)
    : ACE_Creation_Strategy <SVC_HANDLER> (t),
      orb_core_ (orb_core),
      arg_ (arg),
      lite_flag_ (flag)
{

}

template <class SVC_HANDLER> int
TAO_Connect_Creation_Strategy<SVC_HANDLER>::make_svc_handler (SVC_HANDLER *&sh)
{
  if (sh == 0)
    ACE_NEW_RETURN (sh,
                    SVC_HANDLER (this->orb_core_,
                                 this->lite_flag_,
                                 this->arg_),
                    -1);
  return 0;
}


////////////////////////////////////////////////////////////////

template <class SVC_HANDLER>
TAO_Connect_Concurrency_Strategy<SVC_HANDLER>::
     TAO_Connect_Concurrency_Strategy (TAO_ORB_Core *orb_core)
       : orb_core_ (orb_core)
{
}

template <class SVC_HANDLER> int
TAO_Connect_Concurrency_Strategy<SVC_HANDLER>::
    activate_svc_handler (SVC_HANDLER *sh,
                          void *arg)
{
  if (ACE_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler (sh,
                                                                   arg) == -1)
    return -1;

  // If the wait strategy wants us to be registered with the reactor
  // then we do so.
  return sh->transport ()->wait_strategy ()->register_handler ();
}


#endif /*TAO_CONNECTOR_IMPL_CPP*/