summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Connection_Handler.cpp
blob: e7238c07a287bef6c521175f34c99fe3d49c3df3 (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
#include "IIOP_SSL_Connection_Handler.h"
#include "IIOP_SSL_Transport.h"
#include "SSLIOP_Connection_Handler.h"
#include "tao/Timeprobe.h"
#include "tao/ORB_Core.h"
#include "tao/ORB.h"
#include "tao/debug.h"


ACE_RCSID (SSLIOP,
           IIOP_SSL_Connection_Handler,
           "$Id$")


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

#if defined (ACE_ENABLE_TIMEPROBES)

static const char *TAO_IIOP_SSL_Connect_Timeprobe_Description[] =
{
  "IIOP_SSL_Connection_Handler::handle_input - start",
  "IIOP_SSL_Connection_Handler::handle_input - end",

  "IIOP_SSL_Connection_Handler::handle_locate - start",
  "IIOP_SSL_Connection_Handler::handle_locate - end",

  "IIOP_SSL_Connection_Handler::receive_request - end",

  "IIOP_SSL_Connection_Handler::send_request - start",
  "IIOP_SSL_Connection_Handler::send_request - end"};

enum
{
  // Timeprobe description table start key
  TAO_IIOP_SSL_CONNECTION_HANDLER_HANDLE_INPUT_START = 320,
  TAO_IIOP_SSL_CONNECTION_HANDLER_HANDLE_INPUT_END,

  TAO_IIOP_SSL_CONNECTION_HANDLER_HANDLE_LOCATE_START,
  TAO_IIOP_SSL_CONNECTION_HANDLER_HANDLE_LOCATE_END,

  TAO_IIOP_SSL_CONNECTION_HANDLER_RECEIVE_REQUEST_END

};

// Setup Timeprobes
ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_IIOP_SSL_Connect_Timeprobe_Description,
                                  TAO_IIOP_SSL_CONNECTION_HANDLER_HANDLE_INPUT_START);

#endif /* ACE_ENABLE_TIMEPROBES */

TAO::IIOP_SSL_Connection_Handler::IIOP_SSL_Connection_Handler (
  ACE_Thread_Manager *t)
  : TAO_IIOP_Connection_Handler (t)
{
  // This constructor should *never* get called, it is just here to
  // make the compiler happy: the default implementation of the
  // Creation_Strategy requires a constructor with that signature, we
  // don't use that implementation, but some (most?) compilers
  // instantiate it anyway.
  ACE_ASSERT (0);
}


TAO::IIOP_SSL_Connection_Handler::IIOP_SSL_Connection_Handler (
  TAO_ORB_Core *orb_core,
  CORBA::Boolean /*flag*/,
  void *arg)
  : TAO_IIOP_Connection_Handler (
      orb_core,
      (static_cast<TAO::SSLIOP::Connection_Handler_State *> (arg))->tcp_properties)
{
  TAO::SSLIOP::Connection_Handler_State *s =
  static_cast<TAO::SSLIOP::Connection_Handler_State *> (arg);

  IIOP_SSL_Transport* specific_transport = 0;
  ACE_NEW (specific_transport,
           IIOP_SSL_Transport (this,
                               orb_core,
                               s->ssliop_current.in (),
                               0));

  // Delete the transport with TAO_IIOP_Connection_Handler.
  delete this->transport ();

  // store this pointer
  this->transport (specific_transport);
}

TAO::IIOP_SSL_Connection_Handler::~IIOP_SSL_Connection_Handler (void)
{
}

// ****************************************************************