summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableInterceptor.pidl
blob: 0c902810134ac1dcfbea78bc6bb48e39bc5b9545 (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// -*- IDL -*-

/**
 * @file PortableInterceptor.pidl
 *
 * $Id$
 *
 * @brief Pre-compiled IDL source for the PortableInterceptor
 * components in the ORB.
 *
 * This file contains the interface definitions for "Portable"
 * Interceptor support.
 * The following is from orbos/99-12-02 Portable Interceptors spec,
 * the full IDL is downloadable from orbos/99-12-02.
 *
 * Additional updates from ptc/00-08-05 are also included.  Changes
 * include:
 *    - addition of the Interceptor::destroy() method
 *    - move of CodecFactory and Codec interfaces to the IOP module
 *
 * This file was used to generate the code in PortableInterceptorC.*
 * The command used to generate code is:
 *
 *  tao_idl
 *     -o orig -Gp -Gd -Ge 1 -GA -Sc -SS -Sci
 *          -Wb,export_include="tao/TAO_Export.h"
 *          -Wb,export_macro=TAO_Export
 *          -Wb,pre_include="ace/pre.h"
 *          -Wb,post_include="ace/post.h"
 *          PortableInterceptor.pidl
 *
 * Patches for changes to the generated code are available in the
 * `diffs' directory.
 */

// File: PortableInterceptor.idl
#ifndef _PORTABLE_INTERCEPTOR_IDL_
#define _PORTABLE_INTERCEPTOR_IDL_

#include <PI_Forward.pidl>
#include <Current.pidl>
#include <Dynamic.pidl>
#include <Messaging_SyncScope.pidl>
#include <IOP_Codec.pidl>
#include <IOP_IOR.pidl>
#include <Policy.pidl>

#include <ORBInitializer.pidl>
#include <InvalidSlot.pidl>
#include <ClientRequestInfo.pidl>
#include <ServerRequestInfo.pidl>

module PortableInterceptor {

  typeprefix PortableInterceptor "omg.org";

  const AdapterState    HOLDING         = 0;
  const AdapterState    ACTIVE          = 1;
  const AdapterState    DISCARDING      = 2;
  const AdapterState    INACTIVE        = 3;
  const AdapterState    NON_EXISTENT    = 4;

  local interface Interceptor
  {
    readonly attribute string name;
    void destroy ();
  };

  exception ForwardRequest
  {
    Object forward;
  };

  // Valid reply_status values:
  const ReplyStatus SUCCESSFUL = 0;
  const ReplyStatus SYSTEM_EXCEPTION = 1;
  const ReplyStatus USER_EXCEPTION = 2;
  const ReplyStatus LOCATION_FORWARD = 3;
  const ReplyStatus TRANSPORT_RETRY = 4;
  const ReplyStatus UNKNOWN = 5;

  local interface Current : CORBA::Current
  {
    any get_slot (in SlotId id) raises (InvalidSlot);
    void set_slot (in SlotId id, in any data) raises (InvalidSlot);
  };

  local interface ClientRequestInterceptor : Interceptor
  {
    void send_request  (in ClientRequestInfo ri) raises (ForwardRequest);
    void send_poll (in ClientRequestInfo ri);
    void receive_reply (in ClientRequestInfo ri);
    void receive_exception (in ClientRequestInfo ri) raises (ForwardRequest);
    void receive_other (in ClientRequestInfo ri) raises (ForwardRequest);
  };

  local interface ServerRequestInterceptor : Interceptor
  {
    /// Proprietary method in TAO for fault tolerance
    void tao_ft_interception_point (in ServerRequestInfo ri, out CORBA::OctetSeq os) raises (ForwardRequest);
    void receive_request_service_contexts (in ServerRequestInfo ri) raises (ForwardRequest);
    void receive_request (in ServerRequestInfo ri) raises (ForwardRequest);
    void send_reply (in ServerRequestInfo ri);
    void send_exception (in ServerRequestInfo ri) raises (ForwardRequest);
    void send_other (in ServerRequestInfo ri) raises (ForwardRequest);
  };

  local interface PolicyFactory
  {
    CORBA::Policy create_policy (in CORBA::PolicyType type, in any value)
      raises (CORBA::PolicyError);
  };

  local interface IORInterceptor;

  local interface ORBInitInfo
  {
    typedef string ObjectId;

    exception DuplicateName
    {
      string name;
    };

    exception InvalidName {};

    readonly attribute CORBA::StringSeq arguments;
    readonly attribute string orb_id;
    readonly attribute IOP::CodecFactory codec_factory;

    void register_initial_reference (in ObjectId id, in Object obj)
      raises (InvalidName);
    Object resolve_initial_references (in ObjectId id)
      raises (InvalidName);
    void add_client_request_interceptor (
      in ClientRequestInterceptor interceptor)
      raises (DuplicateName);
    void add_server_request_interceptor (
      in ServerRequestInterceptor interceptor)
      raises (DuplicateName);
    void add_ior_interceptor (in IORInterceptor interceptor)
      raises (DuplicateName);
    SlotId allocate_slot_id ();
    void register_policy_factory (
      in CORBA::PolicyType type,
      in PolicyFactory policy_factory);
  };
};

#endif  /* _PORTABLE_INTERCEPTOR_IDL_ */