1 22 package org.jboss.test.iiopperf.ejb; 23 24 import javax.ejb.EJBException ; 25 26 import java.util.Collection ; 27 import java.util.Map ; 28 import java.rmi.Remote ; 29 30 import org.jboss.test.util.ejb.SessionSupport; 31 import org.jboss.test.iiopperf.interfaces.CMFoo; 32 import org.jboss.test.iiopperf.interfaces.Foo; 33 import org.jboss.test.iiopperf.interfaces.TestException; 34 import org.jboss.test.iiopperf.interfaces.Session; 35 import org.jboss.test.iiopperf.interfaces.Zoo; 36 37 41 public class SessionBean 42 extends SessionSupport 43 { 44 private String str = null; 45 private Remote rem = null; 46 private Session session = null; 47 private Foo foo; 48 private CMFoo cmfoo; 49 private Zoo zoo; 50 private int[] intArray; 51 private String [] strArray; 52 private Foo[] fooArray; 53 private Collection coll; 54 private Map map; 55 56 public void ejbCreate() 57 { 58 } 59 60 public void sendReceiveNothing() 61 { 62 } 63 64 public void sendBoolean(boolean flag) 65 { 66 } 67 68 public boolean receiveBoolean() 69 { 70 return true; 71 } 72 73 public boolean sendReceiveBoolean(boolean flag) 74 { 75 return flag; 76 } 77 78 public void sendChar(char c) 79 { 80 } 81 82 public char receiveChar() 83 { 84 return Character.MAX_VALUE; 85 } 86 87 public char sendReceiveChar(char c) 88 { 89 return c; 90 } 91 92 public void sendByte(byte b) 93 { 94 } 95 96 public byte receiveByte() 97 { 98 return Byte.MAX_VALUE; 99 } 100 101 public byte sendReceiveByte(byte b) 102 { 103 return b; 104 } 105 106 public void sendShort(short s) 107 { 108 } 109 110 public short receiveShort() 111 { 112 return Short.MAX_VALUE; 113 } 114 115 public short sendReceiveShort(short s) 116 { 117 return s; 118 } 119 120 public void sendInt(int i) 121 { 122 } 123 124 public int receiveInt() 125 { 126 return Integer.MAX_VALUE; 127 } 128 129 public int sendReceiveInt(int i) 130 { 131 return i; 132 } 133 134 public void sendLong(long l) 135 { 136 } 137 138 public long receiveLong() 139 { 140 return Long.MAX_VALUE; 141 } 142 143 public long sendReceiveLong(long l) 144 { 145 return l; 146 } 147 148 public void sendFloat(float f) 149 { 150 } 151 152 public float receiveFloat() 153 { 154 return Float.MAX_VALUE; 155 } 156 157 public float sendReceiveFloat(float f) 158 { 159 return f; 160 } 161 162 public void sendDouble(double d) 163 { 164 } 165 166 public double receiveDouble() 167 { 168 return Double.MAX_VALUE; 169 } 170 171 public double sendReceiveDouble(double d) 172 { 173 return d; 174 } 175 176 public void sendString(String str) 177 { 178 this.str = str; 179 } 180 181 public String receiveString() 182 { 183 return this.str; 184 } 185 186 public String sendReceiveString(String s) 187 { 188 return s; 189 } 190 191 public void sendRemote(Remote rem) 192 { 193 this.rem = rem; 194 } 195 196 public Remote receiveRemote() 197 { 198 return this.rem; 199 } 200 201 public Remote sendReceiveRemote(Remote r) 202 { 203 return r; 204 } 205 206 public void sendSessionRef(Session session) 207 { 208 this.session = session; 209 } 210 211 public Session receiveSessionRef() 212 { 213 return this.session; 214 } 215 216 public Session sendReceiveSessionRef(Session s) 217 { 218 return s; 219 } 220 221 public void sendSimpleSerializable(Foo foo) 222 { 223 this.foo = foo; 224 } 225 226 public Foo receiveSimpleSerializable() 227 { 228 return this.foo; 229 } 230 231 public Foo sendReceiveSimpleSerializable(Foo foo) 232 { 233 return foo; 234 } 235 236 public void sendSimpleCustomMarshalledSerializable(CMFoo cmfoo) 237 { 238 this.cmfoo = cmfoo; 239 } 240 241 public CMFoo receiveSimpleCustomMarshalledSerializable() 242 { 243 return this.cmfoo; 244 } 245 246 public CMFoo sendReceiveSimpleCustomMarshalledSerializable(CMFoo cmfoo) 247 { 248 return cmfoo; 249 } 250 251 public void sendNestedSerializable(Zoo zoo) 252 { 253 this.zoo = zoo; 254 } 255 256 public Zoo receiveNestedSerializable() 257 { 258 return this.zoo; 259 } 260 261 public Zoo sendReceiveNestedSerializable(Zoo zoo) 262 { 263 return zoo; 264 } 265 266 public void sendIntArray(int[] a) 267 { 268 this.intArray = a; 269 } 270 271 public int[] receiveIntArray() 272 { 273 return this.intArray; 274 } 275 276 public int[] sendReceiveIntArray(int[] a) 277 { 278 return a; 279 } 280 281 public void sendStringArray(String [] a) 282 { 283 this.strArray = a; 284 } 285 286 public String [] receiveStringArray() 287 { 288 return this.strArray; 289 } 290 291 public String [] sendReceiveStringArray(String [] a) 292 { 293 return a; 294 } 295 296 public void sendArrayOfSerializables(Foo[] a) 297 { 298 this.fooArray = a; 299 } 300 301 public Foo[] receiveArrayOfSerializables() 302 { 303 return fooArray; 304 } 305 306 public Foo[] sendReceiveArrayOfSerializables(Foo[] a) 307 { 308 return a; 309 } 310 311 public void sendCollection(Collection c) 312 { 313 this.coll = c; 314 } 315 316 public Collection receiveCollection() 317 { 318 return this.coll; 319 } 320 321 public Collection sendReceiveCollection(Collection c) 322 { 323 return c; 324 } 325 326 public void sendMap(Map m) 327 { 328 this.map = m; 329 } 330 331 public Map receiveMap() 332 { 333 return this.map; 334 } 335 336 public Map sendReceiveMap(Map m) 337 { 338 return m; 339 } 340 341 public void throwException() 342 throws TestException 343 { 344 throw new TestException(); 345 } 346 347 } 348 | Popular Tags |