Пример #1
0
 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) {
     }
 }
Пример #2
0
 public LongPoll(HServerR pthis, BMessage methodResult)
 {
     if (log.isDebugEnabled())
     {
         log.debug("LongPoll(" + methodResult);
     }
     this.pthis = pthis;
     if (methodResult != null)
     {
         this.methodResult = methodResult;
     }
     else
     {
         BOutput outp = pthis.transport.getOutput();
         outp.header.flags |= BMessageHeader.FLAG_RESPONSE;
         outp.store(null);                 // irgendwas, damit auch der Header in den ByteBuffer geschrieben wird.
         this.methodResult = outp.toMessage();
     }
     if (log.isDebugEnabled())
     {
         log.debug(")LongPoll");
     }
 }