protected void handlePendingCallResult(RTMPConnection conn,Notify invoke){
  final IServiceCall call=invoke.getCall();
  final IPendingServiceCall pendingCall=conn.retrievePendingCall(invoke.getInvokeId());
  if (pendingCall != null) {
    Object[] args=call.getArguments();
    if ((args != null) && (args.length > 0)) {
      pendingCall.setResult(args[0]);
    }
    Set<IPendingServiceCallback> callbacks=pendingCall.getCallbacks();
    if (!callbacks.isEmpty()) {
      HashSet<IPendingServiceCallback> tmp=new HashSet<IPendingServiceCallback>();
      tmp.addAll(callbacks);
      for (      IPendingServiceCallback callback : tmp) {
        try {
          callback.resultReceived(pendingCall);
        }
 catch (        Exception e) {
          log.error("Error while executing callback {} {}",callback,e);
        }
      }
    }
  }
}

protected void handlePendingCallResult ( RTMPConnection conn , Notify invoke ) { final IServiceCall call = invoke . getCall ( ) ; final IPendingServiceCall pendingCall = conn . retrievePendingCall ( invoke . getInvokeId ( ) ) ; if ( pendingCall != null ) { Object [ ] args = call . getArguments ( ) ; if ( ( args != null ) && ( args . length > 0 ) ) { pendingCall . setResult ( args [ 0 ] ) ; } Set < IPendingServiceCallback > callbacks = pendingCall . getCallbacks ( ) ; if ( ! callbacks . isEmpty ( ) ) { HashSet < IPendingServiceCallback > tmp = new HashSet < IPendingServiceCallback > ( ) ; tmp . addAll ( callbacks ) ; for ( IPendingServiceCallback callback : tmp ) { try { callback . resultReceived ( pendingCall ) ; } catch ( Exception e ) { log . error ( "Error while executing callback {} {}" , callback , e ) ; } } } } }
handler for pending call result . dispatches results to all pending call handlers .
