1 package org.jacorb.test.orb; 2 3 22 23 import org.jacorb.test.BasicServerPOA; 24 import org.omg.CORBA.BooleanHolder ; 25 import org.omg.CORBA.ByteHolder ; 26 import org.omg.CORBA.DoubleHolder ; 27 import org.omg.CORBA.FloatHolder ; 28 import org.omg.CORBA.IntHolder ; 29 import org.omg.CORBA.LongHolder ; 30 import org.omg.CORBA.ShortHolder ; 31 import org.omg.CORBA.portable.InputStream ; 32 import org.omg.CORBA.portable.OutputStream ; 33 import org.omg.CORBA.portable.ResponseHandler ; 34 35 public class BasicServerImpl extends BasicServerPOA 36 { 37 public void ping() 38 { 39 return; 40 } 41 42 43 public long bounce_long_long(long x) 44 { 45 return x; 46 } 47 48 public int bounce_long(int x) 49 { 50 return x; 51 } 52 53 public short bounce_short(short x) 54 { 55 return x; 56 } 57 58 public long bounce_unsigned_long_long(long x) 59 { 60 return x; 61 } 62 63 public int bounce_unsigned_long(int x) 64 { 65 return x; 66 } 67 68 public short bounce_unsigned_short(short x) 69 { 70 return x; 71 } 72 73 public void pass_in_long_long(long x) 74 { 75 } 77 78 public void pass_in_long(int x) 79 { 80 } 82 83 public void pass_in_short(short x) 84 { 85 } 87 88 public void pass_in_unsigned_long_long(long x) 89 { 90 } 92 93 public void pass_in_unsigned_long(int x) 94 { 95 } 97 98 public void pass_in_unsigned_short(short x) 99 { 100 } 102 103 public void pass_inout_long_long(LongHolder x) 104 { 105 x.value = x.value + 1; 106 } 107 108 public void pass_inout_long(IntHolder x) 109 { 110 x.value = x.value + 1; 111 } 112 113 public void pass_inout_short(ShortHolder x) 114 { 115 x.value = ( short ) ( x.value + 1 ); 116 } 117 118 public void pass_inout_unsigned_long_long(LongHolder x) 119 { 120 x.value = x.value + 1; 121 } 122 123 public void pass_inout_unsigned_long(IntHolder x) 124 { 125 x.value = x.value + 1; 126 } 127 128 public void pass_inout_unsigned_short(ShortHolder x) 129 { 130 x.value = ( short ) ( x.value + 1 ); 131 } 132 133 public void pass_out_long_long(LongHolder x) 134 { 135 x.value = 84; 136 } 137 138 public void pass_out_long(IntHolder x) 139 { 140 x.value = 83; 141 } 142 143 public void pass_out_short(ShortHolder x) 144 { 145 x.value = 82; 146 } 147 148 public void pass_out_unsigned_long_long(LongHolder x) 149 { 150 x.value = 81; 151 } 152 153 public void pass_out_unsigned_long(IntHolder x) 154 { 155 x.value = 80; 156 } 157 158 public void pass_out_unsigned_short(ShortHolder x) 159 { 160 x.value = 79; 161 } 162 163 public long return_long_long() 164 { 165 return 0xffeeddccbbaa0099L; 166 } 167 168 public int return_long() 169 { 170 return -17; 171 } 172 173 public short return_short() 174 { 175 return -4; 176 } 177 178 public long return_unsigned_long_long() 179 { 180 return 0xffeeddccbbaa0088L; 181 } 182 183 public int return_unsigned_long() 184 { 185 return 43; 186 } 187 188 public short return_unsigned_short() 189 { 190 return 87; 191 } 192 193 public boolean bounce_boolean(boolean x) 194 { 195 return x; 196 } 197 198 public void pass_in_boolean(boolean x) 199 { 200 } 202 203 public void pass_inout_boolean(BooleanHolder x) 204 { 205 x.value = !x.value; 206 } 207 208 public void pass_out_boolean(BooleanHolder x) 209 { 210 x.value = true; 211 } 212 213 public boolean return_boolean() 214 { 215 return true; 216 } 217 218 public byte bounce_octet(byte x) 219 { 220 return x; 221 } 222 223 public void pass_in_octet(byte x) 224 { 225 } 227 228 public void pass_inout_octet(ByteHolder x) 229 { 230 x.value = (byte) (x.value + 1); 231 } 232 233 public void pass_out_octet(ByteHolder x) 234 { 235 x.value = 23; 236 } 237 238 public byte return_octet() 239 { 240 return (byte)0xf0; 241 } 242 243 244 public double bounce_double(double x) 245 { 246 return x; 247 } 248 249 public float bounce_float(float x) 250 { 251 return x; 252 } 253 254 public void pass_in_double(double x) 255 { 256 } 258 259 public void pass_in_float(float x) 260 { 261 } 263 264 public void pass_inout_double(DoubleHolder x) 265 { 266 x.value = x.value + 1.0; 267 } 268 269 public void pass_inout_float(FloatHolder x) 270 { 271 x.value = x.value + 1.0F; 272 } 273 274 public void pass_out_double(DoubleHolder x) 275 { 276 x.value = 1234E12; 277 } 278 279 public void pass_out_float(FloatHolder x) 280 { 281 x.value = 0.005F; 282 } 283 284 public double return_double() 285 { 286 return 1E-100; 287 } 288 289 public float return_float() 290 { 291 return 1.5E-1F; 292 } 293 294 } 295 | Popular Tags |