コード例 #1
0
        public Object start(TransferObject to) {
            Object resultObject = null;

            String calleeClass = to.getCalleeClass();
            String calleeMethod = to.getCalleeMethod();

            mStateObject.transferObject = to;

            //check if close method, close client
            if (calleeMethod == METHOD_CLOSE) {
                Close(mStateObject);
                return resultObject;
            }

            //set default server call proxy
            if (to.getServerCallProxy() != null) {
                serverCallProxy = to.getServerCallProxy();
            }

            try {
                if (mStateObject.workSocket == null || !mStateObject.workSocket.Connected || closed) {
                    Connect();
                }
                Send(mStateObject);
                resultObject = Receive(mStateObject);

            } catch (Exception e) {
                Logging.LogError("HostIp and Port: [" + hostIp + ":" + hostPort + "]");
                Logging.LogError("Callee Class and Method: [" + calleeClass + "." + calleeMethod + "]");
                Logging.LogError(e.ToString());
                Close(mStateObject);
                throw e;
            }
            return resultObject;
        }
コード例 #2
0
 public void setServerCallProxy(DefaultProxy serverCallProxy) {
     this.serverCallProxy = serverCallProxy;
 }
コード例 #3
0
 public void registerServerCallProxy(DefaultProxy serverCallProxy) {
     this.serverCallProxy = serverCallProxy;
 }