private void readStreamResult(InH3 hIn,HeadersAmp headers) throws IOException {
  ServiceRefAmp serviceRef=readToAddress(hIn);
  long id=hIn.readLong();
  QueryRefAmp queryRef=serviceRef.getQueryRef(id);
  if (queryRef != null) {
    ClassLoader loader=queryRef.getClassLoader();
    Thread thread=Thread.currentThread();
    thread.setContextClassLoader(loader);
  }
  int sequence=hIn.readInt();
  List<Object> values=(List)hIn.readObject();
  Throwable exn=(Throwable)hIn.readObject(Throwable.class);
  boolean isComplete=hIn.readBoolean();
  if (log.isLoggable(_logLevel)) {
    log.log(_logLevel,"stream-result-r " + values + ","+ isComplete+ " (in "+ this+ ")"+ "\n  {id:"+ id+ ", to:"+ serviceRef+ ","+ headers+ "}");
  }
  if (queryRef != null) {
    if (queryRef.accept(headers,values,sequence,isComplete)) {
      serviceRef.removeQueryRef(id);
    }
    if (exn != null) {
      serviceRef.removeQueryRef(id);
      queryRef.fail(headers,exn);
    }
  }
 else   if (log.isLoggable(Level.WARNING)) {
    log.warning("query-result qid=" + id + " for service "+ serviceRef+ " does not match any known queries.\n"+ headers);
  }
}

private void readStreamResult ( InH3 hIn , HeadersAmp headers ) throws IOException { ServiceRefAmp serviceRef = readToAddress ( hIn ) ; long id = hIn . readLong ( ) ; QueryRefAmp queryRef = serviceRef . getQueryRef ( id ) ; if ( queryRef != null ) { ClassLoader loader = queryRef . getClassLoader ( ) ; Thread thread = Thread . currentThread ( ) ; thread . setContextClassLoader ( loader ) ; } int sequence = hIn . readInt ( ) ; List < Object > values = ( List ) hIn . readObject ( ) ; Throwable exn = ( Throwable ) hIn . readObject ( Throwable . class ) ; boolean isComplete = hIn . readBoolean ( ) ; if ( log . isLoggable ( _logLevel ) ) { log . log ( _logLevel , "stream-result-r " + values + "," + isComplete + " (in " + this + ")" + "\n  {id:" + id + ", to:" + serviceRef + "," + headers + "}" ) ; } if ( queryRef != null ) { if ( queryRef . accept ( headers , values , sequence , isComplete ) ) { serviceRef . removeQueryRef ( id ) ; } if ( exn != null ) { serviceRef . removeQueryRef ( id ) ; queryRef . fail ( headers , exn ) ; } } else if ( log . isLoggable ( Level . WARNING ) ) { log . warning ( "query-result qid=" + id + " for service " + serviceRef + " does not match any known queries.\n" + headers ) ; } }
the stream result message is a partial or final result from the target ' s stream .
