blob: 805921e967e496aa614bbe25d6f1ab94c4b46138 (
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
|
// This may look like C, but it's really -*- C++ -*-
//=============================================================================
/**
* @file Invocation_Endpoint_Selectors.h
*
* $Id$
*
* Strategies for selecting profile/endpoint from an IOR for making an
* invocation.
*
* @author Bala Natarajan <bala@cs.wustl.edu>
*/
//=============================================================================
#ifndef TAO_FT_INVOCATION_ENDPOINT_SELECTOR_H
#define TAO_FT_INVOCATION_ENDPOINT_SELECTOR_H
#include "ace/pre.h"
#include "fault_tol_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/Invocation_Endpoint_Selectors.h"
class TAO_GIOP_Invocation;
/**
* @class TAO_FT_Invocation_Endpoint_Selector
*
* @brief Implementation specific for FT_Service.
*
* We inherit from the Default endpoint selector, as this would give
* us a chance to use the default endpoint selector options if
* needed.
*
*/
class TAO_FT_Export TAO_FT_Invocation_Endpoint_Selector :
public TAO_Default_Endpoint_Selector
{
public:
/// Constructor.
TAO_FT_Invocation_Endpoint_Selector (void);
/// Destructor.
virtual ~TAO_FT_Invocation_Endpoint_Selector (void);
/// Implementation for FT. Please refer to
/// $TAO_ROOT/tao/Invocation_Endpoint_Selectors.h for details of
/// documentation.
virtual void select_endpoint (TAO_GIOP_Invocation *invocation
ACE_ENV_ARG_DECL);
virtual void next (TAO_GIOP_Invocation *invocation
ACE_ENV_ARG_DECL_WITH_DEFAULTS);
virtual void forward (TAO_GIOP_Invocation *invocation,
const TAO_MProfile &mprofile
ACE_ENV_ARG_DECL_WITH_DEFAULTS);
virtual void success (TAO_GIOP_Invocation *invocation);
virtual void close_connection (TAO_GIOP_Invocation *invocation);
protected:
int select_endpoint_i (TAO_GIOP_Invocation *invoc
ACE_ENV_ARG_DECL);
int select_primary (TAO_GIOP_Invocation *invocation
ACE_ENV_ARG_DECL);
int check_profile_for_primary (TAO_GIOP_Invocation *,
TAO_Profile *
ACE_ENV_ARG_DECL);
private:
/// Is the primary alive? The default is yes.
CORBA::Boolean is_primary_alive_;
/// Has the profile list been rewound
CORBA::Boolean is_rewound_;
};
#if defined (__ACE_INLINE__)
# include "FT_Invocation_Endpoint_Selectors.inl"
#endif /* __ACE_INLINE__ */
#include "ace/post.h"
#endif /* FT_TAO_INVOCATION_ENDPOINT_SELECTOR_H */
|