public TransferObjectWrapper getObjectWrapper(TransferInputStream tins) { allTypeBean = new AllTypeBean(); allTypeBean.setAboolean(tins.readBoolean()); allTypeBean.setAbyte(tins.readByte()); allTypeBean.setAshort(tins.readShort()); allTypeBean.setAchar(tins.readChar()); allTypeBean.setAint(tins.readInt()); allTypeBean.setAlong(tins.readLong()); allTypeBean.setAfloat(tins.readFloat()); allTypeBean.setAdouble(tins.readDouble()); allTypeBean.setAdate(tins.readDate()); allTypeBean.setAstring(tins.readString()); return(this); }
public void RemoteTest() { try { //int, String and return String testing int Id = 18; String name = "JimT"; String result = manager.sayHello(Id, name); Logging.LogDebug("result: " + result); //no parameter, void return testing manager.doSomething(); //object parameter, object return testing TestAccount account = new TestAccount(); account.setId(1000); account.setName("JimT"); account = manager.getAccount(account); Logging.LogDebug(account); //all primitive type parameter, object return testing AllTypeBean allTypeBean = manager.getAllTypeBean(true, (byte)25, (short)-2, 'T', 3, (long)4, 5.5f, 6.66d, DateTime.Now, "Hello JimT!"); Logging.LogDebug("allTypeBean: " + allTypeBean); //int array and string array, string array return testing int[] intarr = new int[3]; intarr[0] = 1; intarr[1] = 2; intarr[2] = 3; String[] strarr = new String[3]; strarr[0] = "Jim "; strarr[1] = "Tang "; strarr[2] = "Toronto "; strarr = manager.getArray(intarr, strarr); if (strarr != null) { for (int i = 0; i < strarr.Length; i++) { Logging.LogDebug("strarr: " + strarr[i]); } } //below two are not for performance test //compress testing account = new TestAccount(); account.setId(1000); string str = ""; for (int i = 0; i < 50; i++) { str += "The quick brown fox jumps over the lazy dog. "; } account.setName(str); account = manager.getAccountCompress(account); Logging.LogDebug(account); //asychronous testing account = new TestAccount(); account.setId(1000); account.setName("JimT"); account = manager.getAccountAsynchronous(account); Logging.LogDebug(account); } catch (Exception ex) { Logging.LogError(ex.ToString()); } }
public void setAllTypeBean(AllTypeBean allTypeBean) { this.allTypeBean = allTypeBean; }
public AllTypeBeanWrapper(AllTypeBean allTypeBean) { this.allTypeBean = allTypeBean; }