Esempio n. 1
0
        public override Object execute(TransferObject baseto)
        {
            StandardTransferObject to = (StandardTransferObject)baseto;
            String calleeMethod       = to.getCalleeMethod();

            if (calleeMethod.Equals("receiveMessage"))
            {
                String message = to.getString("message");
                ChatRoomClient.getInstance().receiveMessage(message);
            }

            return(null);
        }
        private void handleServerCall(object receiveObj)
        {
            byte[]         receiveData = (byte[])receiveObj;
            TransferObject to          = new StandardTransferObject();

            try {
                to = TransferUtil.byteArrayToTransferObject(receiveData);
                execute(to);
            } catch (Exception e) {
                Logging.LogError("Callee Class and Method: [" + to.getCalleeClass() + "." + to.getCalleeMethod() + "]");
                Logging.LogError("Handle Receive Data error: " + e);
                Close(mStateObject);
            }
        }