public void setAsyncResult(Object obj, Exception ex) { BOutput bout = transport.getResponse(bin.header); if (ex != null) { bout.setException(ex); } else { bout.store(obj); } asyncResult.setAsyncResult(bout.toMessage(), null); }
public void setAsyncResult(BMessage obj, Exception ex) { try { if (ex != null) { BOutput bout = pthis.transport.getOutput(); bout.header.flags = BMessageHeader.FLAG_RESPONSE; bout.setException(ex); BMessage msg = bout.toMessage(); pthis.sendLongPoll(msg); } else { pthis.sendLongPoll(obj); } } catch (BException) { } }