r2corba 1.6.1-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (237) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGES +173 -0
  3. data/LICENSE +59 -0
  4. data/README.rdoc +62 -0
  5. data/THANKS +54 -0
  6. data/bin/r2corba +8 -0
  7. data/bin/r2corba.bat +20 -0
  8. data/bin/ridlc +11 -0
  9. data/bin/ridlc.bat +23 -0
  10. data/bin/rins +7 -0
  11. data/bin/rins.bat +19 -0
  12. data/ext/.keep +0 -0
  13. data/lib/corba/cbase/IORMap.rb +32 -0
  14. data/lib/corba/cbase/ORB.rb +239 -0
  15. data/lib/corba/cbase/Request.rb +133 -0
  16. data/lib/corba/cbase/Streams.rb +128 -0
  17. data/lib/corba/cbase/Stub.rb +18 -0
  18. data/lib/corba/cbase/Typecode.rb +440 -0
  19. data/lib/corba/cbase/Values.rb +130 -0
  20. data/lib/corba/cbase/exception.rb +67 -0
  21. data/lib/corba/cbase/poa.rb +22 -0
  22. data/lib/corba/cbase/policies.rb +77 -0
  23. data/lib/corba/cbase/post_require.rb +13 -0
  24. data/lib/corba/cbase/require.rb +36 -0
  25. data/lib/corba/cmds/base.rb +84 -0
  26. data/lib/corba/cmds/test.rb +29 -0
  27. data/lib/corba/common/Any.rb +91 -0
  28. data/lib/corba/common/IDL.rb +100 -0
  29. data/lib/corba/common/ORB.rb +367 -0
  30. data/lib/corba/common/Object.rb +211 -0
  31. data/lib/corba/common/Request.rb +19 -0
  32. data/lib/corba/common/Servant.rb +107 -0
  33. data/lib/corba/common/Struct.rb +21 -0
  34. data/lib/corba/common/Stub.rb +78 -0
  35. data/lib/corba/common/Typecode.rb +1147 -0
  36. data/lib/corba/common/Union.rb +60 -0
  37. data/lib/corba/common/Values.rb +92 -0
  38. data/lib/corba/common/const.rb +21 -0
  39. data/lib/corba/common/exception.rb +68 -0
  40. data/lib/corba/common/require.rb +34 -0
  41. data/lib/corba/common/version.rb +21 -0
  42. data/lib/corba/idl/BiDirPolicyC.rb +62 -0
  43. data/lib/corba/idl/CosNamingC.rb +460 -0
  44. data/lib/corba/idl/CosNamingS.rb +308 -0
  45. data/lib/corba/idl/IDL.rb +20 -0
  46. data/lib/corba/idl/IORTable.pidl +61 -0
  47. data/lib/corba/idl/IORTableC.rb +116 -0
  48. data/lib/corba/idl/MessagingC.rb +903 -0
  49. data/lib/corba/idl/POAC.rb +929 -0
  50. data/lib/corba/idl/TAO_Ext.pidl +45 -0
  51. data/lib/corba/idl/TAO_ExtC.rb +178 -0
  52. data/lib/corba/idl/r2c_orb.rb +571 -0
  53. data/lib/corba/idl/require.rb +19 -0
  54. data/lib/corba/jbase/Any.rb +274 -0
  55. data/lib/corba/jbase/IORMap.rb +35 -0
  56. data/lib/corba/jbase/ORB.rb +111 -0
  57. data/lib/corba/jbase/Object.rb +98 -0
  58. data/lib/corba/jbase/Request.rb +225 -0
  59. data/lib/corba/jbase/Servant.rb +247 -0
  60. data/lib/corba/jbase/ServerRequest.rb +127 -0
  61. data/lib/corba/jbase/Streams.rb +734 -0
  62. data/lib/corba/jbase/Stub.rb +37 -0
  63. data/lib/corba/jbase/Typecode.rb +520 -0
  64. data/lib/corba/jbase/Values.rb +174 -0
  65. data/lib/corba/jbase/exception.rb +106 -0
  66. data/lib/corba/jbase/poa.rb +228 -0
  67. data/lib/corba/jbase/policies.rb +299 -0
  68. data/lib/corba/jbase/post_require.rb +13 -0
  69. data/lib/corba/jbase/require.rb +92 -0
  70. data/lib/corba/naming.rb +13 -0
  71. data/lib/corba/naming_service.rb +14 -0
  72. data/lib/corba/poa.rb +14 -0
  73. data/lib/corba/policies.rb +17 -0
  74. data/lib/corba/require.rb +16 -0
  75. data/lib/corba/svcs/ins/cos_naming.rb +432 -0
  76. data/lib/corba/svcs/ins/ins.rb +525 -0
  77. data/lib/corba/svcs/ins/naming_service.rb +118 -0
  78. data/lib/corba.rb +15 -0
  79. data/lib/ridlbe/ruby/config.rb +340 -0
  80. data/lib/ridlbe/ruby/orb.pidlc +0 -0
  81. data/lib/ridlbe/ruby/require.rb +15 -0
  82. data/lib/ridlbe/ruby/walker.rb +1605 -0
  83. data/mkrf_conf_bingem.rb +149 -0
  84. data/rakelib/bin.rake +79 -0
  85. data/rakelib/bin.rb +145 -0
  86. data/rakelib/build.rake +87 -0
  87. data/rakelib/config.rake +51 -0
  88. data/rakelib/config.rb +542 -0
  89. data/rakelib/ext.rake +183 -0
  90. data/rakelib/ext.rb +277 -0
  91. data/rakelib/ext_r2tao.rb +208 -0
  92. data/rakelib/gem.rake +251 -0
  93. data/rakelib/gem.rb +145 -0
  94. data/rakelib/package.rake +25 -0
  95. data/rakelib/test.rake +22 -0
  96. data/test/BiDirectional/Test.idl +33 -0
  97. data/test/BiDirectional/client.rb +131 -0
  98. data/test/BiDirectional/run_test.rb +67 -0
  99. data/test/BiDirectional/server.rb +167 -0
  100. data/test/CORBA_Services/Naming/BindingIterator/Test.idl +26 -0
  101. data/test/CORBA_Services/Naming/BindingIterator/client.rb +120 -0
  102. data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +81 -0
  103. data/test/CORBA_Services/Naming/BindingIterator/server.rb +108 -0
  104. data/test/CORBA_Services/Naming/Corbaname/Test.idl +26 -0
  105. data/test/CORBA_Services/Naming/Corbaname/client.rb +84 -0
  106. data/test/CORBA_Services/Naming/Corbaname/run_test.rb +87 -0
  107. data/test/CORBA_Services/Naming/Corbaname/server.rb +134 -0
  108. data/test/CORBA_Services/Naming/Simple/Test.idl +26 -0
  109. data/test/CORBA_Services/Naming/Simple/client.rb +83 -0
  110. data/test/CORBA_Services/Naming/Simple/run_test.rb +81 -0
  111. data/test/CORBA_Services/Naming/Simple/server.rb +108 -0
  112. data/test/Collocation/Diamond.idl +38 -0
  113. data/test/Collocation/run_test.rb +51 -0
  114. data/test/Collocation/test.rb +201 -0
  115. data/test/Connect_Timeout/Test.idl +26 -0
  116. data/test/Connect_Timeout/client.rb +109 -0
  117. data/test/Connect_Timeout/run_test.rb +51 -0
  118. data/test/DII/Test.idl +26 -0
  119. data/test/DII/client.rb +114 -0
  120. data/test/DII/run_test.rb +68 -0
  121. data/test/DII/server.rb +94 -0
  122. data/test/DSI/Test.idl +26 -0
  123. data/test/DSI/client.rb +65 -0
  124. data/test/DSI/run_test.rb +68 -0
  125. data/test/DSI/server.rb +105 -0
  126. data/test/Exceptions/Test.idl +47 -0
  127. data/test/Exceptions/client.rb +117 -0
  128. data/test/Exceptions/run_test.rb +68 -0
  129. data/test/Exceptions/server.rb +130 -0
  130. data/test/Hello/Test.idl +26 -0
  131. data/test/Hello/client.rb +77 -0
  132. data/test/Hello/run_test.rb +70 -0
  133. data/test/Hello/server.rb +94 -0
  134. data/test/IDL_Test/Test.idl +116 -0
  135. data/test/IDL_Test/Test_inc.idl +17 -0
  136. data/test/IDL_Test/client.rb +103 -0
  137. data/test/IDL_Test/run_test.rb +68 -0
  138. data/test/IDL_Test/server.rb +103 -0
  139. data/test/IORMap/Test.idl +26 -0
  140. data/test/IORMap/client.rb +72 -0
  141. data/test/IORMap/run_test.rb +68 -0
  142. data/test/IORMap/server.rb +113 -0
  143. data/test/IORTable/Test.idl +26 -0
  144. data/test/IORTable/client.rb +74 -0
  145. data/test/IORTable/run_test.rb +68 -0
  146. data/test/IORTable/server.rb +129 -0
  147. data/test/Implicit_Conversion/Test.idl +30 -0
  148. data/test/Implicit_Conversion/client.rb +112 -0
  149. data/test/Implicit_Conversion/run_test.rb +68 -0
  150. data/test/Implicit_Conversion/server.rb +98 -0
  151. data/test/Multi_Threading/Multiple_ORB/Test.idl +26 -0
  152. data/test/Multi_Threading/Multiple_ORB/client.rb +81 -0
  153. data/test/Multi_Threading/Multiple_ORB/run_test.rb +70 -0
  154. data/test/Multi_Threading/Multiple_ORB/server.rb +107 -0
  155. data/test/Multi_Threading/Simple/Test.idl +26 -0
  156. data/test/Multi_Threading/Simple/client.rb +92 -0
  157. data/test/Multi_Threading/Simple/run_test.rb +68 -0
  158. data/test/Multi_Threading/Simple/server.rb +117 -0
  159. data/test/Multi_Threading/Threads/Test.idl +27 -0
  160. data/test/Multi_Threading/Threads/client.rb +77 -0
  161. data/test/Multi_Threading/Threads/run_test.rb +75 -0
  162. data/test/Multi_Threading/Threads/server.rb +116 -0
  163. data/test/Multi_Threading/Threads/watchdog.rb +87 -0
  164. data/test/Multiple_Servant_Interfaces/Test.idl +33 -0
  165. data/test/Multiple_Servant_Interfaces/client.rb +69 -0
  166. data/test/Multiple_Servant_Interfaces/run_test.rb +68 -0
  167. data/test/Multiple_Servant_Interfaces/server.rb +101 -0
  168. data/test/Nil/Test.idl +26 -0
  169. data/test/Nil/run_test.rb +51 -0
  170. data/test/Nil/test.rb +80 -0
  171. data/test/OBV/AbstractInterface/client.rb +178 -0
  172. data/test/OBV/AbstractInterface/run_test.rb +68 -0
  173. data/test/OBV/AbstractInterface/server.rb +149 -0
  174. data/test/OBV/AbstractInterface/test.idl +52 -0
  175. data/test/OBV/Custom/OBV.idl +18 -0
  176. data/test/OBV/Custom/OBV_impl.rb +41 -0
  177. data/test/OBV/Custom/client.rb +85 -0
  178. data/test/OBV/Custom/run_test.rb +68 -0
  179. data/test/OBV/Custom/server.rb +99 -0
  180. data/test/OBV/Simple/OBV.idl +15 -0
  181. data/test/OBV/Simple/OBV_impl.rb +26 -0
  182. data/test/OBV/Simple/client.rb +85 -0
  183. data/test/OBV/Simple/run_test.rb +68 -0
  184. data/test/OBV/Simple/server.rb +99 -0
  185. data/test/OBV/Simple_Event/Event.idl +15 -0
  186. data/test/OBV/Simple_Event/Event_impl.rb +26 -0
  187. data/test/OBV/Simple_Event/client.rb +85 -0
  188. data/test/OBV/Simple_Event/run_test.rb +68 -0
  189. data/test/OBV/Simple_Event/server.rb +99 -0
  190. data/test/OBV/Supports/client.rb +115 -0
  191. data/test/OBV/Supports/run_test.rb +68 -0
  192. data/test/OBV/Supports/server.rb +102 -0
  193. data/test/OBV/Supports/supports.idl +32 -0
  194. data/test/OBV/Supports/supports_impl.rb +59 -0
  195. data/test/OBV/Tree/client.rb +115 -0
  196. data/test/OBV/Tree/run_test.rb +68 -0
  197. data/test/OBV/Tree/server.rb +116 -0
  198. data/test/OBV/Tree/test.idl +31 -0
  199. data/test/OBV/Truncatable/Extra.idl +26 -0
  200. data/test/OBV/Truncatable/Truncatable.idl +105 -0
  201. data/test/OBV/Truncatable/Truncatable_impl.rb +85 -0
  202. data/test/OBV/Truncatable/client.rb +278 -0
  203. data/test/OBV/Truncatable/run_test.rb +68 -0
  204. data/test/OBV/Truncatable/server.rb +88 -0
  205. data/test/OBV/ValueBox/client.rb +497 -0
  206. data/test/OBV/ValueBox/run_test.rb +68 -0
  207. data/test/OBV/ValueBox/server.rb +271 -0
  208. data/test/OBV/ValueBox/valuebox.idl +101 -0
  209. data/test/OBV/ValueBox/vb_basic.idl +75 -0
  210. data/test/OBV/ValueBox/vb_struct.idl +68 -0
  211. data/test/OBV/ValueBox/vb_union.idl +21 -0
  212. data/test/Object/Test.idl +26 -0
  213. data/test/Object/client.rb +111 -0
  214. data/test/Object/run_test.rb +68 -0
  215. data/test/Object/server.rb +125 -0
  216. data/test/POA/Test.idl +27 -0
  217. data/test/POA/run_test.rb +51 -0
  218. data/test/POA/test.rb +111 -0
  219. data/test/Param_Test/Test.idl +182 -0
  220. data/test/Param_Test/client.rb +276 -0
  221. data/test/Param_Test/run_test.rb +68 -0
  222. data/test/Param_Test/server.rb +295 -0
  223. data/test/Performance/Simple/Test.idl +26 -0
  224. data/test/Performance/Simple/client.rb +89 -0
  225. data/test/Performance/Simple/run_test.rb +68 -0
  226. data/test/Performance/Simple/server.rb +94 -0
  227. data/test/Policies/Test.idl +26 -0
  228. data/test/Policies/run_test.rb +51 -0
  229. data/test/Policies/test.rb +142 -0
  230. data/test/Timeout/client.rb +206 -0
  231. data/test/Timeout/run_test.rb +68 -0
  232. data/test/Timeout/server.rb +108 -0
  233. data/test/Timeout/test.idl +18 -0
  234. data/test/lib/assert.rb +41 -0
  235. data/test/lib/test.rb +546 -0
  236. data/test/test_runner.rb +191 -0
  237. metadata +318 -0
@@ -0,0 +1,299 @@
1
+ #--------------------------------------------------------------------
2
+ # policies.rb - Java/JacORB R2CORBA Policy support loader
3
+ #
4
+ # Author: Martin Corino
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the R2CORBA LICENSE which is
8
+ # included with this program.
9
+ #
10
+ # Copyright (c) Remedy IT Expertise BV
11
+ #--------------------------------------------------------------------
12
+
13
+ module R2CORBA
14
+
15
+ module CORBA
16
+
17
+ module ORB
18
+ def create_policy(type, val)
19
+ raise CORBA::BAD_PARAM.new('Any expected', 0, CORBA::COMPLETED_NO) unless CORBA::Any === val
20
+ begin
21
+ Policy._wrap_native(self.orb_.create_policy(type.to_i, val.to_java(self.orb_)))
22
+ rescue ::NativeException
23
+ CORBA::Exception.native2r($!)
24
+ end
25
+ end
26
+ end # ORB
27
+
28
+ module Object
29
+ def _get_policy(policy_type)
30
+ raise CORBA::INV_OBJREF.new if self._is_nil?()
31
+ begin
32
+ pol = Policy._wrap_native(self.objref_._get_policy(policy_type))
33
+ rescue ::NativeException
34
+ CORBA::Exception.native2r($!)
35
+ end
36
+ raise CORBA::INV_POLICY if CORBA.is_nil(pol) # provide spec compliance
37
+ end
38
+
39
+ def _get_policy_overrides(ts)
40
+ raise CORBA::INV_OBJREF.new if self._is_nil?()
41
+ ## currently JacORB does not support #_get_policy_overrides so we emulate it in that case
42
+ unless self.objref_.respond_to?(:_get_policy_overrides)
43
+ begin
44
+ ts.collect { |pt| Policy._wrap_native(self.objref_._get_policy(pt)) }.compact
45
+ rescue ::NativeException
46
+ CORBA::Exception.native2r($!)
47
+ end
48
+ else
49
+ begin
50
+ jpolicies = self.objref_._get_policy_overrides(ts.to_java(:int))
51
+ rescue ::NativeException
52
+ CORBA::Exception.native2r($!)
53
+ end
54
+ jpolicies.collect {|jpol| Policy._wrap_native(jpol) }
55
+ end
56
+ end # of operation get_policy_overrides
57
+
58
+ def _set_policy_overrides(policies, set_add)
59
+ raise CORBA::INV_OBJREF.new if self._is_nil?()
60
+ jpolicies = CORBA::Native::Reflect::Array.newInstance(CORBA::Native::Policy.java_class, policies.size)
61
+ policies.each_with_index {|e, i| jpolicies[i] = e.objref_ }
62
+ begin
63
+ obj = self.objref_._set_policy_override(jpolicies, Native::SetOverrideType.from_int(set_add))
64
+ rescue ::NativeException
65
+ CORBA::Exception.native2r($!)
66
+ end
67
+ CORBA::Object._wrap_native(obj)
68
+ end
69
+
70
+ ## Currently unsupported by JacORB
71
+ # def _validate_connection(inconsistent_policies)
72
+ # raise CORBA::INV_OBJREF.new if self._is_nil?()
73
+ # jpollist = CORBA::Native::PolicyListHolder.new
74
+ # ret = self.objref_._validate_connection(jpollist) rescue CORBA::Exception.native2r($!)
75
+ # jpollist.value.each {|jpol| inconsistent_policies << Policy._wrap_native(jpol) }
76
+ # ret
77
+ # end
78
+ end # Object
79
+
80
+ module Policy
81
+ def self._wrap_native(jpol)
82
+ raise ArgumentError, 'Expected org.omg.CORBA.Policy' unless jpol.nil? || jpol.is_a?(Native::Policy)
83
+ Policy._narrow(CORBA::Object._wrap_native(jpol))
84
+ end
85
+
86
+ #------------------- "Policy Operations"
87
+
88
+ def policy_type()
89
+ begin
90
+ self.objref_.policy_type()
91
+ rescue ::NativeException
92
+ CORBA::Exception.native2r($!)
93
+ end
94
+ end # of attribute get_policy_type
95
+
96
+ def copy()
97
+ begin
98
+ Policy._wrap_native(self.objref_.copy())
99
+ rescue ::NativeException
100
+ CORBA::Exception.native2r($!)
101
+ end
102
+ end # of operation copy
103
+
104
+ def destroy()
105
+ begin
106
+ self.objref_.destroy()
107
+ rescue ::NativeException
108
+ CORBA::Exception.native2r($!)
109
+ end
110
+ @objref_ = nil
111
+ end # of operation destroy
112
+ end # Policy
113
+
114
+ module PolicyManager
115
+ #------------------- "PolicyManager Operations"
116
+
117
+ def get_policy_overrides(ts)
118
+ begin
119
+ jpolicies = self.objref_.get_policy_overrides(ts.to_java(:int))
120
+ rescue ::NativeException
121
+ CORBA::Exception.native2r($!)
122
+ end
123
+ jpolicies.collect {|jpol| Policy._wrap_native(jpol) }
124
+ end # of operation get_policy_overrides
125
+
126
+ def set_policy_overrides(policies, set_add)
127
+ jpolicies = CORBA::Native::Reflect::Array.newInstance(CORBA::Native::Policy.java_class, policies.size)
128
+ policies.each_with_index {|e, i| jpolicies[i] = e.objref_ }
129
+ begin
130
+ self.objref_.set_policy_overrides(jpolicies, Native::SetOverrideType.from_int(set_add))
131
+ rescue ::NativeException
132
+ CORBA::Exception.native2r($!)
133
+ end
134
+ end # of operation set_policy_overrides
135
+ end # Policy
136
+
137
+ end # CORBA
138
+
139
+ module PortableServer
140
+
141
+ module POA
142
+ def create_thread_policy(value)
143
+ begin
144
+ PortableServer::ThreadPolicy._narrow(
145
+ CORBA::Object._wrap_native(
146
+ self.objref_.create_thread_policy(PortableServer::Native::ThreadPolicyValue.from_int(value))))
147
+ rescue ::NativeException
148
+ CORBA::Exception.native2r($!)
149
+ end
150
+ end # of operation create_thread_policy
151
+
152
+ def create_lifespan_policy(value)
153
+ begin
154
+ PortableServer::LifespanPolicy._narrow(
155
+ CORBA::Object._wrap_native(
156
+ self.objref_.create_lifespan_policy(PortableServer::Native::LifespanPolicyValue.from_int(value))))
157
+ rescue ::NativeException
158
+ CORBA::Exception.native2r($!)
159
+ end
160
+ end # of operation create_lifespan_policy
161
+
162
+ def create_id_uniqueness_policy(value)
163
+ begin
164
+ PortableServer::IdUniquenessPolicy._narrow(
165
+ CORBA::Object._wrap_native(
166
+ self.objref_.create_id_uniqueness_policy(PortableServer::Native::IdUniquenessPolicyValue.from_int(value))))
167
+ rescue ::NativeException
168
+ CORBA::Exception.native2r($!)
169
+ end
170
+ end # of operation create_id_uniqueness_policy
171
+
172
+ def create_id_assignment_policy(value)
173
+ begin
174
+ PortableServer::IdAssignmentPolicy._narrow(
175
+ CORBA::Object._wrap_native(
176
+ self.objref_.create_id_assignment_policy(PortableServer::Native::IdAssignmentPolicyValue.from_int(value))))
177
+ rescue ::NativeException
178
+ CORBA::Exception.native2r($!)
179
+ end
180
+ end # of operation create_id_assignment_policy
181
+
182
+ def create_implicit_activation_policy(value)
183
+ begin
184
+ PortableServer::ImplicitActivationPolicy._narrow(
185
+ CORBA::Object._wrap_native(
186
+ self.objref_.create_implicit_activation_policy(PortableServer::Native::ImplicitActivationPolicyValue.from_int(value))))
187
+ rescue ::NativeException
188
+ CORBA::Exception.native2r($!)
189
+ end
190
+ end # of operation create_implicit_activation_policy
191
+
192
+ def create_servant_retention_policy(value)
193
+ begin
194
+ PortableServer::ServantRetentionPolicy._narrow(
195
+ CORBA::Object._wrap_native(
196
+ self.objref_.create_servant_retention_policy(PortableServer::Native::ServantRetentionPolicyValue.from_int(value))))
197
+ rescue ::NativeException
198
+ CORBA::Exception.native2r($!)
199
+ end
200
+ end # of operation create_servant_retention_policy
201
+
202
+ def create_request_processing_policy(value)
203
+ begin
204
+ PortableServer::RequestProcessingPolicy._narrow(
205
+ CORBA::Object._wrap_native(
206
+ self.objref_.create_request_processing_policy(PortableServer::Native::RequestProcessingPolicyValue.from_int(value))))
207
+ rescue ::NativeException
208
+ CORBA::Exception.native2r($!)
209
+ end
210
+ end # of operation create_request_processing_policy
211
+ end # POA
212
+
213
+ module ThreadPolicy ## interface
214
+ def value()
215
+ begin
216
+ self.objref_.value().value()
217
+ rescue ::NativeException
218
+ CORBA::Exception.native2r($!)
219
+ end
220
+ end # of attribute get_value
221
+ end # of interface ThreadPolicy
222
+
223
+ module LifespanPolicy ## interface
224
+ def value()
225
+ begin
226
+ self.objref_.value().value()
227
+ rescue ::NativeException
228
+ CORBA::Exception.native2r($!)
229
+ end
230
+ end # of attribute get_value
231
+ end # of interface LifespanPolicy
232
+
233
+ module IdUniquenessPolicy ## interface
234
+ def value()
235
+ begin
236
+ self.objref_.value().value()
237
+ rescue ::NativeException
238
+ CORBA::Exception.native2r($!)
239
+ end
240
+ end # of attribute get_value
241
+ end # of interface IdUniquenessPolicy
242
+
243
+ module IdAssignmentPolicy ## interface
244
+ def value()
245
+ begin
246
+ self.objref_.value().value()
247
+ rescue ::NativeException
248
+ CORBA::Exception.native2r($!)
249
+ end
250
+ end # of attribute get_value
251
+ end # of interface IdAssignmentPolicy
252
+
253
+ module ImplicitActivationPolicy ## interface
254
+ def value()
255
+ begin
256
+ self.objref_.value().value()
257
+ rescue ::NativeException
258
+ CORBA::Exception.native2r($!)
259
+ end
260
+ end # of attribute get_value
261
+ end # of interface ImplicitActivationPolicy
262
+
263
+ module ServantRetentionPolicy ## interface
264
+ def value()
265
+ begin
266
+ self.objref_.value().value()
267
+ rescue ::NativeException
268
+ CORBA::Exception.native2r($!)
269
+ end
270
+ end # of attribute get_value
271
+ end # of interface RequestProcessingPolicy
272
+
273
+ module RequestProcessingPolicy ## interface
274
+ def value()
275
+ begin
276
+ self.objref_.value().value()
277
+ rescue ::NativeException
278
+ CORBA::Exception.native2r($!)
279
+ end
280
+ end # of attribute get_value
281
+ end # of interface RequestProcessingPolicy
282
+
283
+ end # PortableServer
284
+
285
+ module BiDirPolicy
286
+
287
+ module BidirectionalPolicy ## interface
288
+ def value()
289
+ begin
290
+ self.objref_.value().value()
291
+ rescue ::NativeException
292
+ CORBA::Exception.native2r($!)
293
+ end
294
+ end # of attribute get_value
295
+ end # of interface BidirectionalPolicy
296
+
297
+ end # BiDirPolicy
298
+
299
+ end # R2CORBA
@@ -0,0 +1,13 @@
1
+ #--------------------------------------------------------------------
2
+ # require.rb - R2CORBA loader finalizer
3
+ #
4
+ # Author: Martin Corino
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the R2CORBA LICENSE which is
8
+ # included with this program.
9
+ #
10
+ # Copyright (c) Remedy IT Expertise BV
11
+ #--------------------------------------------------------------------
12
+
13
+ require 'corba/jbase/IORMap'
@@ -0,0 +1,92 @@
1
+ #--------------------------------------------------------------------
2
+ # require.rb - R2CORBA loader
3
+ #
4
+ # Author: Martin Corino
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the R2CORBA LICENSE which is
8
+ # included with this program.
9
+ #
10
+ # Copyright (c) Remedy IT Expertise BV
11
+ #--------------------------------------------------------------------
12
+ require 'rbconfig'
13
+ require 'java'
14
+
15
+ module R2CORBA
16
+ if ENV['JACORB_HOME'] &&
17
+ (File.exist?(File.join(ENV['JACORB_HOME'], 'lib', 'jacorb.jar')) ||
18
+ Dir[File.join(ENV['JACORB_HOME'], 'lib', 'jacorb-*.jar')].any? {|p| p =~ /\/jacorb\-\d\.\d\.jar\Z/})
19
+ JACORB_HOME = ENV['JACORB_HOME']
20
+ else
21
+ # find jacorb.jar in library search path
22
+ JACORB_HOME = File.dirname(($:.find { |path| Dir[File.join(path, 'jacorb-*.jar')].any? {|p| p =~ /\/jacorb(\.jar|\-\d\.\d\.jar)\Z/} }).to_s)
23
+ end
24
+
25
+ $LOAD_PATH << File.join(JACORB_HOME, 'lib')
26
+ module JavaLang
27
+ include_package 'java.lang'
28
+ ## Only works if passed as Java commandline arg
29
+ # prop = System.getProperties['java.endorsed.dirs']
30
+ # System.setProperty('java.endorsed.dirs', "#{File.join(R2CORBA::JACORB_HOME, 'lib')}:#{prop}")
31
+ System.setProperty('jacorb.home', "#{R2CORBA::JACORB_HOME}")
32
+ System.setProperty('org.omg.CORBA.ORBClass', 'org.jacorb.orb.ORB')
33
+ System.setProperty('org.omg.CORBA.ORBSingletonClass', 'org.jacorb.orb.ORBSingleton')
34
+ System.setProperty('jacorb.orb.print_version', $VERBOSE ? 'on' : 'off')
35
+ System.setProperty('jacorb.log.default.verbosity', $VERBOSE ? '3' : '1')
36
+ end
37
+ end
38
+
39
+ # add required JAR files for JacORB from searchpath
40
+ Dir.glob(File.join(R2CORBA::JACORB_HOME, 'lib', '*.jar')).each do |jar|
41
+ require File.basename(jar)
42
+ end
43
+
44
+ module R2CORBA
45
+ module CORBA
46
+ module Native
47
+ # first include CORBA::Object separately to avoid 'Object' replacement warnings
48
+ java_import 'org.omg.CORBA.Object'
49
+ include_package 'org.omg.CORBA'
50
+ module Portable
51
+ include_package 'org.omg.CORBA.portable'
52
+ end
53
+
54
+ module V2_3
55
+ include_package 'org.omg.CORBA_2_3'
56
+ module Portable
57
+ include_package 'org.omg.CORBA.portable'
58
+ end
59
+ end
60
+
61
+ module V2_5
62
+ include_package 'org.omg.CORBA_2_5'
63
+ end
64
+
65
+ module V3_0
66
+ include_package 'org.omg.CORBA_3_0'
67
+ end
68
+
69
+ module Jacorb
70
+ module Util
71
+ java_import org.jacorb.util.Version
72
+ end
73
+ VERSION = Util::Version.version
74
+ va = VERSION.split('.')
75
+ MAJOR_VERSION = va.shift.to_i
76
+ MINOR_VERSION = va.shift.to_i
77
+ RELEASE_NR = va.shift.to_i
78
+ end
79
+ end
80
+ end
81
+ end
82
+
83
+ [ 'exception',
84
+ 'Object',
85
+ 'ORB',
86
+ 'Request',
87
+ 'Stub',
88
+ 'Typecode',
89
+ 'Any',
90
+ 'Values',
91
+ 'Streams'
92
+ ].each { |f| require "corba/jbase/#{f}.rb" }
@@ -0,0 +1,13 @@
1
+ #--------------------------------------------------------------------
2
+ # naming.rb - R2CORBA CosNaming client definitions loader
3
+ #
4
+ # Author: Martin Corino
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the R2CORBA LICENSE which is
8
+ # included with this program.
9
+ #
10
+ # Copyright (c) Remedy IT Expertise BV
11
+ #--------------------------------------------------------------------
12
+
13
+ require 'corba/idl/CosNamingC'
@@ -0,0 +1,14 @@
1
+ #--------------------------------------------------------------------
2
+ # naming_service.rb - R2CORBA CosNaming server definitions loader
3
+ #
4
+ # Author: Martin Corino
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the R2CORBA LICENSE which is
8
+ # included with this program.
9
+ #
10
+ # Copyright (c) Remedy IT Expertise BV
11
+ #--------------------------------------------------------------------
12
+
13
+ require 'corba/naming.rb'
14
+ require 'corba/idl/CosNamingS'
data/lib/corba/poa.rb ADDED
@@ -0,0 +1,14 @@
1
+ #--------------------------------------------------------------------
2
+ # poa.rb - R2CORBA POA loader
3
+ #
4
+ # Author: Martin Corino
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the R2CORBA LICENSE which is
8
+ # included with this program.
9
+ #
10
+ # Copyright (c) Remedy IT Expertise BV
11
+ #--------------------------------------------------------------------
12
+
13
+ require 'corba.rb'
14
+ require "corba/#{defined?(JRUBY_VERSION) ? 'jbase' : 'cbase'}/poa.rb"
@@ -0,0 +1,17 @@
1
+ #--------------------------------------------------------------------
2
+ # policies.rb - R2CORBA Policy support loader
3
+ #
4
+ # Author: Martin Corino
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the R2CORBA LICENSE which is
8
+ # included with this program.
9
+ #
10
+ # Copyright (c) Remedy IT Expertise BV
11
+ #--------------------------------------------------------------------
12
+
13
+ require 'corba.rb'
14
+ require 'corba/poa.rb'
15
+ require 'corba/idl/BiDirPolicyC'
16
+ require 'corba/idl/MessagingC'
17
+ require "corba/#{defined?(JRUBY_VERSION) ? 'jbase' : 'cbase'}/policies.rb"
@@ -0,0 +1,16 @@
1
+ #--------------------------------------------------------------------
2
+ # require.rb - R2CORBA loader
3
+ #
4
+ # Author: Martin Corino
5
+ #
6
+ # This program is free software; you can redistribute it and/or
7
+ # modify it under the terms of the R2CORBA LICENSE which is
8
+ # included with this program.
9
+ #
10
+ # Copyright (c) Remedy IT Expertise BV
11
+ #--------------------------------------------------------------------
12
+
13
+ require 'corba/common/require'
14
+ require "corba/#{defined?(JRUBY_VERSION) ? 'jbase' : 'cbase'}/require"
15
+ require 'corba/idl/require'
16
+ require "corba/#{defined?(JRUBY_VERSION) ? 'jbase' : 'cbase'}/post_require"