~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to TAO/tests/Portable_Interceptors/ForwardRequest/Client_Request_Interceptor.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- C++ -*-
2
 
 
3
 
//=============================================================================
4
 
/**
5
 
 * @file Client_Request_Interceptor.h
6
 
 *
7
 
 * Client_Request_Interceptor.h,v 1.3 2002/01/29 20:21:09 okellogg Exp
8
 
 *
9
 
 * Implementation header for the client request interceptor for the
10
 
 * PortableInterceptor::ForwardRequest test.
11
 
 *
12
 
 * @author Ossama Othman <ossama@uci.edu>
13
 
 */
14
 
//=============================================================================
15
 
 
16
 
#ifndef CLIENT_REQUEST_INTERCEPTOR_H
17
 
#define CLIENT_REQUEST_INTERCEPTOR_H
18
 
 
19
 
#include "ace/config-all.h"
20
 
 
21
 
#if !defined (ACE_LACKS_PRAGMA_ONCE)
22
 
# pragma once
23
 
#endif /* ACE_LACKS_PRAGMA_ONCE */
24
 
 
25
 
#include "tao/PortableInterceptorC.h"
26
 
#include "tao/LocalObject.h"
27
 
#include "tao/ORB.h"
28
 
#include "tao/CORBA_String.h"
29
 
 
30
 
#if defined(_MSC_VER)
31
 
#if (_MSC_VER >= 1200)
32
 
#pragma warning(push)
33
 
#endif /* _MSC_VER >= 1200 */
34
 
#pragma warning(disable:4250)
35
 
#endif /* _MSC_VER */
36
 
 
37
 
/**
38
 
 * @class Client_Request_Interceptor
39
 
 *
40
 
 * @brief Client request interceptor that exercises
41
 
 * PortableInterceptor::ForwardRequest support.
42
 
 *
43
 
 * This client request interceptor forwards a request to a secondary
44
 
 * object by throwing the PortableInterceptor::ForwardRequest
45
 
 * exception from within the send_request() interception point.  It
46
 
 * only forwards the initial request.  See the README file for
47
 
 * details.
48
 
 */
49
 
class Client_Request_Interceptor
50
 
  : public virtual PortableInterceptor::ClientRequestInterceptor,
51
 
    public virtual TAO_Local_RefCounted_Object
52
 
{
53
 
public:
54
 
 
55
 
  /// Constructor.
56
 
  Client_Request_Interceptor (const char *orb_id,
57
 
                              const char *forward_str);
58
 
 
59
 
  /**
60
 
   * @name Methods Required by the Client Request Interceptor
61
 
   * Interface
62
 
   *
63
 
   * These are methods that must be implemented since they are pure
64
 
   * virtual in the abstract base class.  They are the canonical
65
 
   * methods required for all client request interceptors.
66
 
   */
67
 
  //@{
68
 
  /// Return the name of this ClientRequestinterceptor.
69
 
  virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
70
 
    ACE_THROW_SPEC ((CORBA::SystemException));
71
 
 
72
 
  virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
73
 
    ACE_THROW_SPEC ((CORBA::SystemException));
74
 
 
75
 
  virtual void send_request (
76
 
      PortableInterceptor::ClientRequestInfo_ptr ri
77
 
      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
78
 
    ACE_THROW_SPEC ((CORBA::SystemException,
79
 
                     PortableInterceptor::ForwardRequest));
80
 
 
81
 
  virtual void send_poll (
82
 
      PortableInterceptor::ClientRequestInfo_ptr ri
83
 
      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
84
 
    ACE_THROW_SPEC ((CORBA::SystemException));
85
 
 
86
 
  virtual void receive_reply (
87
 
      PortableInterceptor::ClientRequestInfo_ptr ri
88
 
      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
89
 
    ACE_THROW_SPEC ((CORBA::SystemException));
90
 
 
91
 
  virtual void receive_exception (
92
 
      PortableInterceptor::ClientRequestInfo_ptr ri
93
 
      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
94
 
    ACE_THROW_SPEC ((CORBA::SystemException,
95
 
                     PortableInterceptor::ForwardRequest));
96
 
 
97
 
  virtual void receive_other (
98
 
      PortableInterceptor::ClientRequestInfo_ptr ri
99
 
      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
100
 
    ACE_THROW_SPEC ((CORBA::SystemException,
101
 
                     PortableInterceptor::ForwardRequest));
102
 
  //@}
103
 
 
104
 
private:
105
 
 
106
 
  ///The ID of the ORB this interceptor is registered with.
107
 
  CORBA::String_var orb_id_;
108
 
 
109
 
  /// Pseudo-reference to the ORB this interceptor is registered
110
 
  /// with.
111
 
  CORBA::ORB_var orb_;
112
 
 
113
 
  /// The number of requests intercepted by this interceptor.
114
 
  CORBA::ULong request_count_;
115
 
 
116
 
  /// Stringified reference to the object the initial request will be
117
 
  /// forwarded to by this interceptor.
118
 
  CORBA::String_var forward_str_;
119
 
 
120
 
};
121
 
 
122
 
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
123
 
#pragma warning(pop)
124
 
#endif /* _MSC_VER */
125
 
 
126
 
#endif  /* CLIENT_REQUEST_INTERCEPTOR_H */