示例#1
0
        public TestAccount getAccountCompress(TestAccount account)
        {
            StandardTransferObject to = transferObjectFactory.createTransferObject();

            to.setCalleeClass("com.qileyuan.tatala.example.proxy.TestServerProxy");
            to.setCalleeMethod("getAccount");
            to.registerReturnType(TransferObject.DATATYPE_WRAPPER);

            TestAccountWrapper accountWrapper = new TestAccountWrapper(account);

            to.putWrapper("account", accountWrapper);
            to.setCompress(true);

            accountWrapper = (TestAccountWrapper)ServerExecutor.execute(to);

            if (accountWrapper != null)
            {
                TestAccount returnAccount = accountWrapper.getAccount();
                return(returnAccount);
            }
            else
            {
                return(null);
            }
        }
示例#2
0
        public TestAccount getAccountAsynchronous(TestAccount account)
        {
            StandardTransferObject to = transferObjectFactory.createTransferObject();

            to.setCalleeClass("com.qileyuan.tatala.example.proxy.TestServerProxy");
            to.setCalleeMethod("getAccount");
            to.registerReturnType(TransferObject.DATATYPE_WRAPPER);

            TestAccountWrapper accountWrapper = new TestAccountWrapper(account);

            to.putWrapper("account", accountWrapper);
            to.setAsynchronous(true);

            Future future = (Future)ServerExecutor.execute(to);

            accountWrapper = (TestAccountWrapper)future.Get();
            TestAccount returnAccount = accountWrapper.getAccount();

            return(returnAccount);
        }