r2corba 1.6.2-x64-mingw32 → 1.7.1-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +5 -5
  2. data/README.rdoc +5 -5
  3. data/lib/corba/cbase/ORB.rb +9 -8
  4. data/lib/corba/cbase/Request.rb +10 -12
  5. data/lib/corba/cbase/Streams.rb +20 -20
  6. data/lib/corba/cbase/Typecode.rb +12 -41
  7. data/lib/corba/cbase/Values.rb +1 -4
  8. data/lib/corba/cbase/exception.rb +0 -2
  9. data/lib/corba/cbase/poa.rb +2 -2
  10. data/lib/corba/cbase/policies.rb +9 -8
  11. data/lib/corba/cbase/require.rb +1 -1
  12. data/lib/corba/cmds/base.rb +1 -2
  13. data/lib/corba/common/Any.rb +2 -3
  14. data/lib/corba/common/IDL.rb +3 -7
  15. data/lib/corba/common/ORB.rb +19 -19
  16. data/lib/corba/common/Object.rb +32 -22
  17. data/lib/corba/common/Request.rb +0 -2
  18. data/lib/corba/common/Servant.rb +4 -9
  19. data/lib/corba/common/Stub.rb +9 -7
  20. data/lib/corba/common/Typecode.rb +44 -27
  21. data/lib/corba/common/Values.rb +4 -5
  22. data/lib/corba/common/require.rb +1 -3
  23. data/lib/corba/common/version.rb +2 -4
  24. data/lib/corba/idl/IDL.rb +0 -2
  25. data/lib/corba/idl/require.rb +2 -2
  26. data/lib/corba/jbase/Any.rb +34 -35
  27. data/lib/corba/jbase/ORB.rb +5 -6
  28. data/lib/corba/jbase/Object.rb +10 -10
  29. data/lib/corba/jbase/Request.rb +8 -9
  30. data/lib/corba/jbase/Servant.rb +32 -36
  31. data/lib/corba/jbase/ServerRequest.rb +10 -8
  32. data/lib/corba/jbase/Streams.rb +80 -78
  33. data/lib/corba/jbase/Stub.rb +1 -1
  34. data/lib/corba/jbase/Typecode.rb +18 -46
  35. data/lib/corba/jbase/Values.rb +0 -1
  36. data/lib/corba/jbase/exception.rb +2 -1
  37. data/lib/corba/jbase/poa.rb +18 -17
  38. data/lib/corba/jbase/policies.rb +42 -45
  39. data/lib/corba/jbase/require.rb +3 -3
  40. data/lib/corba/naming_service.rb +1 -1
  41. data/lib/corba/poa.rb +1 -1
  42. data/lib/corba/policies.rb +2 -2
  43. data/lib/corba/svcs/ins/cos_naming.rb +29 -18
  44. data/lib/corba/svcs/ins/ins.rb +38 -38
  45. data/lib/corba/svcs/ins/naming_service.rb +6 -6
  46. data/lib/corba.rb +1 -1
  47. data/lib/ridlbe/ruby/config.rb +2 -8
  48. data/lib/ridlbe/ruby/orb.pidlc +0 -0
  49. data/lib/ridlbe/ruby/walker.rb +94 -108
  50. data/rakelib/config.rb +9 -6
  51. data/rakelib/ext.rake +1 -1
  52. data/rakelib/ext_r2tao.rb +1 -1
  53. data/rakelib/gem.rake +0 -30
  54. data/test/BiDirectional/client.rb +7 -7
  55. data/test/BiDirectional/run_test.rb +2 -2
  56. data/test/BiDirectional/server.rb +13 -13
  57. data/test/CORBA_Services/Naming/BindingIterator/client.rb +9 -9
  58. data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +2 -2
  59. data/test/CORBA_Services/Naming/BindingIterator/server.rb +6 -6
  60. data/test/CORBA_Services/Naming/Corbaname/client.rb +6 -6
  61. data/test/CORBA_Services/Naming/Corbaname/run_test.rb +2 -2
  62. data/test/CORBA_Services/Naming/Corbaname/server.rb +8 -8
  63. data/test/CORBA_Services/Naming/Simple/client.rb +6 -6
  64. data/test/CORBA_Services/Naming/Simple/run_test.rb +2 -2
  65. data/test/CORBA_Services/Naming/Simple/server.rb +6 -6
  66. data/test/Collocation/run_test.rb +2 -2
  67. data/test/Collocation/test.rb +1 -1
  68. data/test/Connect_Timeout/client.rb +7 -7
  69. data/test/Connect_Timeout/run_test.rb +2 -2
  70. data/test/DII/client.rb +10 -10
  71. data/test/DII/run_test.rb +2 -2
  72. data/test/DII/server.rb +7 -7
  73. data/test/DSI/client.rb +6 -6
  74. data/test/DSI/run_test.rb +2 -2
  75. data/test/DSI/server.rb +9 -9
  76. data/test/Exceptions/client.rb +6 -6
  77. data/test/Exceptions/run_test.rb +2 -2
  78. data/test/Exceptions/server.rb +7 -7
  79. data/test/Hello/client.rb +7 -7
  80. data/test/Hello/run_test.rb +2 -2
  81. data/test/Hello/server.rb +7 -7
  82. data/test/IDL_Test/client.rb +9 -9
  83. data/test/IDL_Test/run_test.rb +2 -2
  84. data/test/IDL_Test/server.rb +7 -7
  85. data/test/IORMap/client.rb +7 -7
  86. data/test/IORMap/run_test.rb +2 -2
  87. data/test/IORMap/server.rb +9 -9
  88. data/test/IORTable/client.rb +7 -7
  89. data/test/IORTable/run_test.rb +2 -2
  90. data/test/IORTable/server.rb +10 -10
  91. data/test/Implicit_Conversion/client.rb +5 -5
  92. data/test/Implicit_Conversion/run_test.rb +2 -2
  93. data/test/Implicit_Conversion/server.rb +7 -7
  94. data/test/Multi_Threading/Multiple_ORB/client.rb +6 -6
  95. data/test/Multi_Threading/Multiple_ORB/run_test.rb +2 -2
  96. data/test/Multi_Threading/Multiple_ORB/server.rb +5 -5
  97. data/test/Multi_Threading/Simple/client.rb +6 -6
  98. data/test/Multi_Threading/Simple/run_test.rb +2 -2
  99. data/test/Multi_Threading/Simple/server.rb +8 -8
  100. data/test/Multi_Threading/Threads/client.rb +6 -6
  101. data/test/Multi_Threading/Threads/run_test.rb +2 -2
  102. data/test/Multi_Threading/Threads/server.rb +9 -9
  103. data/test/Multi_Threading/Threads/watchdog.rb +7 -7
  104. data/test/Multiple_Servant_Interfaces/client.rb +7 -7
  105. data/test/Multiple_Servant_Interfaces/run_test.rb +2 -2
  106. data/test/Multiple_Servant_Interfaces/server.rb +7 -7
  107. data/test/Nil/run_test.rb +2 -2
  108. data/test/Nil/test.rb +4 -4
  109. data/test/OBV/AbstractInterface/client.rb +9 -9
  110. data/test/OBV/AbstractInterface/run_test.rb +2 -2
  111. data/test/OBV/AbstractInterface/server.rb +7 -7
  112. data/test/OBV/Custom/client.rb +5 -5
  113. data/test/OBV/Custom/run_test.rb +2 -2
  114. data/test/OBV/Custom/server.rb +7 -7
  115. data/test/OBV/Simple/client.rb +5 -5
  116. data/test/OBV/Simple/run_test.rb +2 -2
  117. data/test/OBV/Simple/server.rb +7 -7
  118. data/test/OBV/Simple_Event/client.rb +5 -5
  119. data/test/OBV/Simple_Event/run_test.rb +2 -2
  120. data/test/OBV/Simple_Event/server.rb +7 -7
  121. data/test/OBV/Supports/client.rb +17 -17
  122. data/test/OBV/Supports/run_test.rb +2 -2
  123. data/test/OBV/Supports/server.rb +7 -7
  124. data/test/OBV/Tree/client.rb +6 -6
  125. data/test/OBV/Tree/run_test.rb +2 -2
  126. data/test/OBV/Tree/server.rb +7 -7
  127. data/test/OBV/Truncatable/client.rb +5 -5
  128. data/test/OBV/Truncatable/run_test.rb +2 -2
  129. data/test/OBV/Truncatable/server.rb +6 -6
  130. data/test/OBV/ValueBox/client.rb +20 -20
  131. data/test/OBV/ValueBox/run_test.rb +2 -2
  132. data/test/OBV/ValueBox/server.rb +8 -8
  133. data/test/Object/client.rb +6 -6
  134. data/test/Object/run_test.rb +2 -2
  135. data/test/Object/server.rb +9 -9
  136. data/test/POA/run_test.rb +2 -2
  137. data/test/POA/test.rb +4 -4
  138. data/test/Param_Test/client.rb +6 -6
  139. data/test/Param_Test/run_test.rb +2 -2
  140. data/test/Param_Test/server.rb +6 -6
  141. data/test/Performance/Simple/client.rb +6 -6
  142. data/test/Performance/Simple/run_test.rb +2 -2
  143. data/test/Performance/Simple/server.rb +7 -7
  144. data/test/Policies/run_test.rb +2 -2
  145. data/test/Policies/test.rb +4 -4
  146. data/test/Timeout/client.rb +11 -11
  147. data/test/Timeout/run_test.rb +2 -2
  148. data/test/Timeout/server.rb +9 -9
  149. data/test/lib/test.rb +5 -5
  150. data/test/test_runner.rb +8 -7
  151. metadata +6 -7
@@ -11,11 +11,9 @@
11
11
  #--------------------------------------------------------------------
12
12
  module R2CORBA
13
13
  module CORBA
14
-
15
14
  module Object
16
-
17
15
  # ret InterfaceDef
18
- def _get_interface()
16
+ def _get_interface
19
17
  raise ::CORBA::NO_IMPLEMENT
20
18
  # ifdef_obj = self.objref_._get_interface_def rescue CORBA::Exception.native2r($!)
21
19
  # (ifdef_obj = CORBA::Native::InterfaceDefHelper.narrow(ifdef_obj) rescue CORBA::Exception.native2r($!)) unless ifdef_obj.nil?
@@ -24,10 +22,11 @@ module R2CORBA
24
22
  # ::String logical_type_id
25
23
  # ret boolean
26
24
  def _is_a?(logical_type_id)
27
- raise CORBA::INV_OBJREF.new if self._is_nil?()
25
+ raise CORBA::INV_OBJREF.new if self._is_nil?
28
26
  ## JacORB's LocalObjects throw NO_IMPLEMENT on _is_a?() and _ids() is also not always defined
29
27
  return true if self.objref_.is_a?(CORBA::Native::LocalObject) &&
30
- (!self.objref_.respond_to?(:_ids) || self.objref_._ids().include?(logical_type_id))
28
+ (!self.objref_.respond_to?(:_ids) || self.objref_._ids.include?(logical_type_id))
29
+
31
30
  begin
32
31
  self.objref_._is_a(logical_type_id)
33
32
  rescue ::NativeException
@@ -36,10 +35,11 @@ module R2CORBA
36
35
  end
37
36
 
38
37
  # ret ::String
39
- def _repository_id()
40
- raise CORBA::INV_OBJREF.new if self._is_nil?()
38
+ def _repository_id
39
+ raise CORBA::INV_OBJREF.new if self._is_nil?
41
40
  ## if this object ref has already been narrowed
42
41
  return self._interface_repository_id if self.respond_to?(:_interface_repository_id)
42
+
43
43
  ## ask the remote side
44
44
  ## have to do this ourselves since JacORB only resolves this locally (never calling remote)
45
45
  req = self._request('_repository_id')
@@ -49,8 +49,9 @@ module R2CORBA
49
49
 
50
50
  unless CORBA::Native::Portable::ObjectImpl.public_instance_methods.include?(:_get_component)
51
51
  # ret ::CORBA::Object
52
- def _get_component()
53
- raise CORBA::INV_OBJREF.new if self._is_nil?()
52
+ def _get_component
53
+ raise CORBA::INV_OBJREF.new if self._is_nil?
54
+
54
55
  ## ask the remote side
55
56
  ## have to do this ourselves since JacORB does not support this remote method on Object
56
57
  ## and we can't use #invoke since this should work without narrowing
@@ -92,7 +93,6 @@ module R2CORBA
92
93
  CORBA::Exception.native2r($!)
93
94
  end
94
95
  end
95
-
96
96
  end # Object
97
97
  end # CORBA
98
98
  end # R2CORBA
@@ -11,7 +11,6 @@
11
11
  #--------------------------------------------------------------------
12
12
  module R2CORBA
13
13
  module CORBA
14
-
15
14
  module Request
16
15
  @@wrapper_klass = Class.new do
17
16
  include CORBA::Request
@@ -25,12 +24,13 @@ module R2CORBA
25
24
 
26
25
  def self._wrap_native(nreq, target)
27
26
  raise ArgumentError, 'Expected org.omg.CORBA.Request' unless nreq.nil? || nreq.is_a?(Native::Request)
28
- nreq.nil?() ? nreq : @@wrapper_klass.new(nreq, target)
27
+
28
+ nreq.nil? ? nreq : @@wrapper_klass.new(nreq, target)
29
29
  end
30
30
 
31
31
  def operation
32
32
  begin
33
- self.req_.operation()
33
+ self.req_.operation
34
34
  rescue ::NativeException
35
35
  CORBA::Exception.native2r($!)
36
36
  end
@@ -80,10 +80,11 @@ module R2CORBA
80
80
 
81
81
  def arguments=(*args)
82
82
  if args.size == 1
83
- raise ArgumentError, 'invalid argument list' unless ::Array === args.first && args.first.all? {|a| ::Array === a }
83
+ raise ArgumentError, 'invalid argument list' unless ::Array === args.first && args.first.all? { |a| ::Array === a }
84
+
84
85
  args = args.first
85
86
  else
86
- raise ArgumentError, 'invalid argument list' unless args.all? {|a| ::Array === a }
87
+ raise ArgumentError, 'invalid argument list' unless args.all? { |a| ::Array === a }
87
88
  end
88
89
  # clear current arguments
89
90
  begin
@@ -153,7 +154,7 @@ module R2CORBA
153
154
  rescue ::NativeException
154
155
  CORBA::Exception.native2r($!)
155
156
  end
156
- jex = self.req_.env().exception()
157
+ jex = self.req_.env.exception
157
158
  unless jex.nil?
158
159
  STDERR.puts "#{jex}\n#{jex.backtrace.join("\n")}" if $VERBOSE
159
160
  if jex.is_a?(CORBA::Native::SystemException)
@@ -161,7 +162,7 @@ module R2CORBA
161
162
  elsif jex.is_a?(CORBA::Native::UnknownUserException)
162
163
  CORBA::UserException._raise(jex)
163
164
  else
164
- raise CORBA::UNKNOWN.new(jex.getMessage(), 0, CORBA::COMPLETED_MAYBE)
165
+ raise CORBA::UNKNOWN.new(jex.getMessage, 0, CORBA::COMPLETED_MAYBE)
165
166
  end
166
167
  end
167
168
  self.result
@@ -218,8 +219,6 @@ module R2CORBA
218
219
  return *rc
219
220
  end
220
221
  end
221
-
222
222
  end
223
-
224
223
  end # CORBA
225
224
  end # R2CORBA
@@ -11,11 +11,8 @@
11
11
  #--------------------------------------------------------------------
12
12
 
13
13
  module R2CORBA
14
-
15
14
  module PortableServer
16
-
17
15
  module DSI
18
-
19
16
  class Servant < PortableServer::Native::DynamicImplementation
20
17
  def self.new_instance(rsrv)
21
18
  srv = PortableServer::DSI::Servant.new
@@ -33,38 +30,39 @@ module R2CORBA
33
30
  @rsrv
34
31
  end
35
32
 
36
- def detach_rbServant()
33
+ def detach_rbServant
37
34
  @rsrv = nil
38
35
  end
39
36
 
40
37
  def invoke(jsrvreq)
41
38
  begin
42
39
  raise CORBA::NO_IMPLEMENT.new('', 0, CORBA::COMPLETED_NO) unless @rsrv
43
- rsrvreq = CORBA::ServerRequest._wrap_native(jsrvreq, self._orb())
40
+
41
+ rsrvreq = CORBA::ServerRequest._wrap_native(jsrvreq, self._orb)
44
42
  begin
45
- case rsrvreq.srvreq_.operation()
43
+ case rsrvreq.srvreq_.operation
46
44
  when '_is_a'
47
- rsrvreq.describe({:arg_list => [['', CORBA::ARG_IN, CORBA._tc_string]], :result_type => CORBA._tc_boolean})
45
+ rsrvreq.describe({arg_list: [['', CORBA::ARG_IN, CORBA._tc_string]], result_type: CORBA._tc_boolean})
48
46
  rc = self._is_a(*rsrvreq.arguments)
49
- jany = rsrvreq.orb_.create_any()
47
+ jany = rsrvreq.orb_.create_any
50
48
  jany.insert_boolean(rc == true)
51
49
  jsrvreq.set_result(jany)
52
50
  when '_non_existent'
53
- rsrvreq.describe({:arg_list => [], :result_type => CORBA._tc_boolean})
51
+ rsrvreq.describe({arg_list: [], result_type: CORBA._tc_boolean})
54
52
  rc = self._non_existent(*rsrvreq.arguments)
55
- jany = rsrvreq.orb_.create_any()
53
+ jany = rsrvreq.orb_.create_any
56
54
  jany.insert_boolean(rc == true)
57
55
  jsrvreq.set_result(jany)
58
56
  when '_repository_id'
59
- rsrvreq.describe({:arg_list => [], :result_type => CORBA._tc_string})
57
+ rsrvreq.describe({arg_list: [], result_type: CORBA._tc_string})
60
58
  rc = self._repository_id(*rsrvreq.arguments)
61
- jany = rsrvreq.orb_.create_any()
59
+ jany = rsrvreq.orb_.create_any
62
60
  jany.insert_string(rc)
63
61
  jsrvreq.set_result(jany)
64
62
  when '_component'
65
- rsrvreq.describe({:arg_list => [], :result_type => CORBA._tc_Object})
63
+ rsrvreq.describe({arg_list: [], result_type: CORBA._tc_Object})
66
64
  rc = self._get_component(*rsrvreq.arguments)
67
- jany = rsrvreq.orb_.create_any()
65
+ jany = rsrvreq.orb_.create_any
68
66
  jany.insert_Object(rc)
69
67
  jsrvreq.set_result(jany)
70
68
  else
@@ -75,14 +73,14 @@ module R2CORBA
75
73
  end
76
74
  rescue CORBA::UserException => ex_
77
75
  STDERR.puts "#{ex_}\n#{ex_.backtrace.join("\n")}" if $VERBOSE
78
- if rsrvreq.exc_list_.nil? || rsrvreq.exc_list_.any? {|extc| extc.id == ex_.class._tc.id }
79
- jsrvreq.set_exception(CORBA::Any.to_any(ex_).to_java(self._orb()))
76
+ if rsrvreq.exc_list_.nil? || rsrvreq.exc_list_.any? { |extc| extc.id == ex_.class._tc.id }
77
+ jsrvreq.set_exception(CORBA::Any.to_any(ex_).to_java(self._orb))
80
78
  else
81
79
  STDERR.puts "#{ex_}\n#{ex_.backtrace.join("\n")}" unless $VERBOSE
82
80
  if jsrvreq.respond_to?(:setSystemException) # JacORB special
83
81
  jsrvreq.setSystemException(CORBA::Native::UNKNOWN.new("#{ex_}", 0, CORBA::Native::CompletionStatus.from_int(CORBA::COMPLETED_MAYBE)))
84
82
  else
85
- jsrvreq.set_exception(CORBA::Any.to_any(CORBA::UNKNOWN.new("#{ex_}", 0, CORBA::COMPLETED_MAYBE)).to_java(self._orb()))
83
+ jsrvreq.set_exception(CORBA::Any.to_any(CORBA::UNKNOWN.new("#{ex_}", 0, CORBA::COMPLETED_MAYBE)).to_java(self._orb))
86
84
  end
87
85
  end
88
86
  rescue CORBA::SystemException => ex_
@@ -91,14 +89,14 @@ module R2CORBA
91
89
  jex_klass = CORBA::Native.const_get(ex_.class::Name)
92
90
  jsrvreq.setSystemException(jex_klass.new(ex_.reason, ex_.minor, CORBA::Native::CompletionStatus.from_int(ex_.completed)))
93
91
  else
94
- jsrvreq.set_exception(CORBA::Any.to_any(ex_).to_java(self._orb()))
92
+ jsrvreq.set_exception(CORBA::Any.to_any(ex_).to_java(self._orb))
95
93
  end
96
94
  rescue Exception => ex_
97
95
  STDERR.puts "#{ex_}\n#{ex_.backtrace.join("\n")}"
98
96
  if jsrvreq.respond_to?(:setSystemException) # JacORB special
99
97
  jsrvreq.setSystemException(CORBA::Native::UNKNOWN.new("#{ex_}", 0, CORBA::Native::CompletionStatus.from_int(CORBA::COMPLETED_MAYBE)))
100
98
  else
101
- jsrvreq.set_exception(CORBA::Any.to_any(CORBA::UNKNOWN.new("#{ex_}", 0, CORBA::COMPLETED_MAYBE)).to_java(self._orb()))
99
+ jsrvreq.set_exception(CORBA::Any.to_any(CORBA::UNKNOWN.new("#{ex_}", 0, CORBA::COMPLETED_MAYBE)).to_java(self._orb))
102
100
  end
103
101
  end
104
102
  end
@@ -108,7 +106,7 @@ module R2CORBA
108
106
  return [].to_java(:string)
109
107
  elsif @rsrv.respond_to?(:_ids)
110
108
  return @rsrv._ids.to_java(:string)
111
- elsif @rsrv.class.constants.any? {|c| c.to_sym == :Ids }
109
+ elsif @rsrv.class.constants.any? { |c| c.to_sym == :Ids }
112
110
  return @rsrv.class::Ids.to_java(:string)
113
111
  elsif @rsrv.respond_to?(:_primary_interface)
114
112
  return [@rsrv._primary_interface(oid, poa)].to_java(:string)
@@ -141,7 +139,7 @@ module R2CORBA
141
139
  end
142
140
  end
143
141
 
144
- def _non_existent()
142
+ def _non_existent
145
143
  if @rsrv.nil?
146
144
  return true
147
145
  elsif @rsrv.respond_to?(:_non_existent)
@@ -151,7 +149,7 @@ module R2CORBA
151
149
  end
152
150
  end
153
151
 
154
- def _get_component()
152
+ def _get_component
155
153
  if @rsrv.nil?
156
154
  return nil
157
155
  elsif @rsrv.respond_to?(:_get_component)
@@ -163,7 +161,7 @@ module R2CORBA
163
161
  end
164
162
  protected
165
163
  def invoke_SI(rsrvreq)
166
- opsym = rsrvreq.srvreq_.operation().to_sym
164
+ opsym = rsrvreq.srvreq_.operation.to_sym
167
165
  opsig = @rsrv.get_operation_signature(opsym)
168
166
  # explicitly define empty (but not nil) exceptionlist if not yet specified
169
167
  opsig[:exc_list] = [] if (Hash === opsig) && !opsig.has_key?(:exc_list)
@@ -174,17 +172,17 @@ module R2CORBA
174
172
  unless rsrvreq.result_type_.nil?
175
173
  result_value = (rsrvreq.arg_out_ > 0 ? results.shift : results) unless rsrvreq.result_type_.kind == CORBA::TK_VOID
176
174
  if rsrvreq.arg_out_ > 0
177
- rsrvreq.nvlist_.count().times do |i|
175
+ rsrvreq.nvlist_.count.times do |i|
178
176
  jnv = rsrvreq.nvlist_.item(i)
179
177
  if [CORBA::ARG_OUT, CORBA::ARG_INOUT].include?(jnv.flags)
180
178
  rval = results.shift
181
179
  rtc = rsrvreq.arg_list_[i][2]
182
- CORBA::Any.to_any(rval, rtc).to_java(self._orb(), jnv.value())
180
+ CORBA::Any.to_any(rval, rtc).to_java(self._orb, jnv.value)
183
181
  end
184
182
  end
185
183
  end
186
184
  unless rsrvreq.result_type_.kind == CORBA::TK_VOID
187
- rsrvreq.srvreq_.set_result(CORBA::Any.to_any(result_value, rsrvreq.result_type_).to_java(self._orb()))
185
+ rsrvreq.srvreq_.set_result(CORBA::Any.to_any(result_value, rsrvreq.result_type_).to_java(self._orb))
188
186
  end
189
187
  end
190
188
  end
@@ -194,22 +192,21 @@ module R2CORBA
194
192
  unless rsrvreq.result_type_.nil?
195
193
  result_value = (rsrvreq.arg_out_ > 0 ? results.shift : results) unless rsrvreq.result_type_.kind == CORBA::TK_VOID
196
194
  if rsrvreq.arg_out_ > 0
197
- rsrvreq.nvlist_.count().times do |i|
195
+ rsrvreq.nvlist_.count.times do |i|
198
196
  jnv = rsrvreq.nvlist_.item(i)
199
197
  if [CORBA::ARG_OUT, CORBA::ARG_INOUT].include?(jnv.flags)
200
198
  rval = results.shift
201
199
  rtc = rsrvreq.arg_list_[i][2]
202
- CORBA::Any.to_any(rval, rtc).to_java(self._orb(), jnv.value())
200
+ CORBA::Any.to_any(rval, rtc).to_java(self._orb, jnv.value)
203
201
  end
204
202
  end
205
203
  end
206
204
  unless rsrvreq.result_type_.kind == CORBA::TK_VOID
207
- rsrvreq.srvreq_.set_result(CORBA::Any.to_any(result_value, rsrvreq.result_type_).to_java(self._orb()))
205
+ rsrvreq.srvreq_.set_result(CORBA::Any.to_any(result_value, rsrvreq.result_type_).to_java(self._orb))
208
206
  end
209
207
  end
210
208
  end
211
209
  end # Servant
212
-
213
210
  end # DSI
214
211
 
215
212
  class Servant
@@ -217,23 +214,24 @@ module R2CORBA
217
214
  @srvref_ ||= PortableServer::DSI::Servant.new_instance(self)
218
215
  end
219
216
 
220
- def _default_POA()
217
+ def _default_POA
221
218
  begin
222
- return PortableServer::POA._narrow(CORBA::Object._wrap_native(self.srvref_._default_POA()))
219
+ return PortableServer::POA._narrow(CORBA::Object._wrap_native(self.srvref_._default_POA))
223
220
  rescue ::NativeException
224
221
  CORBA::Exception.native2r($!)
225
222
  end
226
223
  end
227
224
 
228
- def _this()
225
+ def _this
229
226
  unless @srvref_.nil?
230
227
  begin
231
- return CORBA::Object._wrap_native(self.srvref_._this_object())
228
+ return CORBA::Object._wrap_native(self.srvref_._this_object)
232
229
  rescue NativeException
233
230
  # not in call context or not associated with ORB yet
234
231
  end
235
232
  end
236
233
  raise CORBA::BAD_INV_ORDER.new('no ORB initialized', 0, CORBA::COMPLETED_NO) if CORBA::ORB._orb.nil?
234
+
237
235
  begin
238
236
  return CORBA::Object._wrap_native(self.srvref_._this_object(CORBA::ORB._orb))
239
237
  rescue ::NativeException
@@ -241,7 +239,5 @@ module R2CORBA
241
239
  end
242
240
  end
243
241
  end # Servant
244
-
245
242
  end # PortableServer
246
-
247
243
  end # R2CORBA
@@ -11,9 +11,7 @@
11
11
  #--------------------------------------------------------------------
12
12
 
13
13
  module R2CORBA
14
-
15
14
  module CORBA
16
-
17
15
  module ServerRequest
18
16
  @@wrapper_klass = Class.new do
19
17
  include CORBA::ServerRequest
@@ -40,6 +38,7 @@ module R2CORBA
40
38
  def self._wrap_native(jsrvreq, jorb)
41
39
  raise ArgumentError, 'Expected org.omg.CORBA.ServerRequest' unless jsrvreq.is_a?(Native::ServerRequest)
42
40
  raise ArgumentError, 'Expected org.omg.CORBA.ORB' unless jorb.is_a?(Native::ORB)
41
+
43
42
  @@wrapper_klass.new(jsrvreq, jorb)
44
43
  end
45
44
 
@@ -54,21 +53,24 @@ module R2CORBA
54
53
  def describe(opsig)
55
54
  raise CORBA::BAD_INV_ORDER.new('', 0, CORBA::COMPLETED_NO) if @nvlist_
56
55
  raise CORBA::NO_IMPLEMENT.new('', 0, CORBA::COMPLETED_NO) unless opsig && (Hash === opsig)
56
+
57
57
  @arg_list_ = opsig[:arg_list]
58
58
  @result_type_ = opsig[:result_type]
59
59
  @exc_list_ = opsig[:exc_list]
60
60
  raise CORBA::BAD_PARAM.new('', 0, CORBA::COMPLETED_NO) unless (@arg_list_.nil? || @arg_list_.is_a?(Array)) &&
61
61
  (@result_type_.nil? || @result_type_.is_a?(CORBA::TypeCode)) &&
62
62
  (@exc_list_.nil? || @exc_list_.is_a?(Array))
63
+
63
64
  @nvlist_ = extract_arguments_(@arg_list_)
64
65
  self
65
66
  end
66
67
 
67
68
  def arguments
68
69
  raise CORBA::BAD_INV_ORDER.new('', 0, CORBA::COMPLETED_NO) unless @nvlist_
70
+
69
71
  unless @arg_
70
72
  @arg_ = []
71
- @nvlist_.count().times do |i|
73
+ @nvlist_.count.times do |i|
72
74
  jnv = @nvlist_.item(i)
73
75
  @arg_ << CORBA::Any.from_java(jnv.value, self.orb_, @arg_list_[i][2]) if [CORBA::ARG_IN, CORBA::ARG_INOUT].include?(jnv.flags)
74
76
  @arg_out_ += 1 if [CORBA::ARG_OUT, CORBA::ARG_INOUT].include?(jnv.flags)
@@ -82,6 +84,7 @@ module R2CORBA
82
84
  key = arg_index_from_name(key) if String === key
83
85
  key = key.to_i if key
84
86
  raise CORBA::BAD_PARAM.new('', 0, CORBA::COMPLETD_NO) unless key && (key >= 0) && (key < @arg_.size)
87
+
85
88
  @arg_[key]
86
89
  end
87
90
 
@@ -90,9 +93,10 @@ module R2CORBA
90
93
  key = arg_index_from_name(key) if String === key
91
94
  key = key.to_i if key
92
95
  raise CORBA::BAD_PARAM.new('', 0, CORBA::COMPLETD_NO) unless key && (key >= 0) && (key < @arg_.size)
96
+
93
97
  jnv = @nvlist_.item(key)
94
98
  rtc = @arg_list_[key][2]
95
- CORBA::Any.to_any(val, rtc).to_java(self.orb_, jnv.value())
99
+ CORBA::Any.to_any(val, rtc).to_java(self.orb_, jnv.value)
96
100
  @arg_[key] = val
97
101
  end
98
102
 
@@ -100,7 +104,7 @@ module R2CORBA
100
104
  def arg_index_from_name(arg_name)
101
105
  unless @arg_index_
102
106
  @arg_index_ = {}
103
- @nvlist_.count().times do |i|
107
+ @nvlist_.count.times do |i|
104
108
  jnv = @nvlist_.item(i)
105
109
  @arg_index_[jnv.name] = i
106
110
  end
@@ -113,15 +117,13 @@ module R2CORBA
113
117
  unless arg_list.nil?
114
118
  arg_list.each do |argnm, argf, argtc|
115
119
  raise CORBA::BAD_PARAM.new('', 0, CORBA::COMPLETED_NO) if argf.nil? || argtc.nil? || !argtc.is_a?(CORBA::TypeCode)
120
+
116
121
  jnvlist.add_value(argnm.to_s, Any.to_any(nil, argtc).to_java(@orb_), argf.to_i)
117
122
  end
118
123
  self.srvreq_.arguments(jnvlist)
119
124
  end
120
125
  jnvlist
121
126
  end
122
-
123
127
  end # ServerRequest
124
-
125
128
  end # CORBA
126
-
127
129
  end # R2CORBA