invoke() public method

public invoke ( RpcMessage m ) : RpcMessage
m RpcMessage
return RpcMessage
Exemplo n.º 1
0
        public void dispatchMsg(RpcMessage m)
        {
            RpcServantDelegate dg = null;

            if ((m.calltype & RpcMessage.CALL) != 0)
            {
                lock (_servants) {
                    if (!_servants.ContainsKey(m.ifidx))
                    {
                        doError(RpcException.RPCERROR_INTERFACE_NOTFOUND, m);
                        return;
                    }
                    dg = _servants[m.ifidx];
                }
                try {
                    RpcMessage msgreturn = dg.invoke(m);
                    if (msgreturn != null)
                    {
                        m.conn.sendMessage(msgreturn);
                    }
                }
                catch (Exception e) {
                    RpcCommunicator.instance().logger.error(" execute servant failed:" + e.ToString());
                    doError(RpcException.RPCERROR_REMOTEMETHOD_EXCEPTION, m);
                }
            }
        }
Exemplo n.º 2
0
        public void dispatchMsg(RpcMessage m)
        {
            RpcServantDelegate dg = null;

            if ((m.calltype & RpcMessage.CALL) != 0)
            {
                lock (_servants) {
                    if (!_servants.ContainsKey(m.ifidx))
                    {
                        doError(RpcException.RPCERROR_INTERFACE_NOTFOUND, m);
                        return;
                    }
                    dg = _servants[m.ifidx];
                }
                dg.invoke(m);
            }
        }