Ejemplo n.º 1
0
 public void onSystemNotification_async(
     Notification_t notification,
     ITerminal_AsyncCallBack async,
     HashMap<String, String> props,
     Object cookie)
     throws RpcException {
   boolean r_5 = false;
   RpcMessage m_6 = new RpcMessage(RpcMessage.CALL | RpcMessage.ASYNC);
   m_6.ifidx = 0;
   m_6.opidx = 3;
   m_6.paramsize = 1;
   m_6.extra.setProperties(props);
   m_6.cookie = cookie;
   try {
     ByteArrayOutputStream bos_7 = new ByteArrayOutputStream();
     DataOutputStream dos_8 = new DataOutputStream(bos_7);
     notification.marshall(dos_8);
     m_6.paramstream = bos_7.toByteArray();
     m_6.prx = this;
     m_6.async = async;
   } catch (Exception e) {
     throw new RpcException(RpcConsts.RPCERROR_DATADIRTY, e.toString());
   }
   r_5 = this.conn.sendMessage(m_6);
   if (!r_5) {
     throw new RpcException(RpcConsts.RPCERROR_SENDFAILED);
   }
 }
Ejemplo n.º 2
0
 public void onError_async(
     String errcode,
     String errmsg,
     ITerminal_AsyncCallBack async,
     HashMap<String, String> props,
     Object cookie)
     throws RpcException {
   boolean r_7 = false;
   RpcMessage m_8 = new RpcMessage(RpcMessage.CALL | RpcMessage.ASYNC);
   m_8.ifidx = 0;
   m_8.opidx = 2;
   m_8.paramsize = 2;
   m_8.extra.setProperties(props);
   m_8.cookie = cookie;
   try {
     ByteArrayOutputStream bos_9 = new ByteArrayOutputStream();
     DataOutputStream dos_10 = new DataOutputStream(bos_9);
     byte[] sb_11 = errcode.getBytes();
     dos_10.writeInt(sb_11.length);
     dos_10.write(sb_11, 0, sb_11.length);
     byte[] sb_12 = errmsg.getBytes();
     dos_10.writeInt(sb_12.length);
     dos_10.write(sb_12, 0, sb_12.length);
     m_8.paramstream = bos_9.toByteArray();
     m_8.prx = this;
     m_8.async = async;
   } catch (Exception e) {
     throw new RpcException(RpcConsts.RPCERROR_DATADIRTY, e.toString());
   }
   r_7 = this.conn.sendMessage(m_8);
   if (!r_7) {
     throw new RpcException(RpcConsts.RPCERROR_SENDFAILED);
   }
 }