1 22 23 package org.xquark.mediator.plan ; 24 25 import org.xquark.mediator.runtime.MediatorException; 26 27 public abstract class MultResultSet extends ResultSet { 28 private static final String RCSRevision = "$Revision: 1.6 $"; 32 private static final String RCSName = "$Name: $"; 33 protected OperatorRunnable[] children = null ; 37 38 public MultResultSet(OpMult operator, DynamicContext context) { 42 super(operator, context) ; 43 } 44 public MultResultSet(OpMult operator, DynamicContext context, OperatorRunnable[] runnables) { 45 super(operator, context) ; 46 this.children = runnables; 47 } 48 49 53 58 protected void setFinishedWhenEmpty() throws MediatorException { 59 super.setFinishedWhenEmpty() ; 60 for (int i=0;i<children.length;i++) { 61 ResultSet resulti = children[i].getResultSet(); 62 if (resulti != null) { 63 resulti.getOperator().terminate(); 64 resulti.close(); 65 } 66 } 67 } 68 69 72 public void close() throws MediatorException { 73 super.close() ; 74 for (int i=0;i<children.length;i++) { 75 ResultSet resulti = children[i].getResultSet(); 76 if (resulti != null) { 77 resulti.getOperator().terminate(); 78 resulti.close(); 79 } 80 } 81 } 82 83 88 91 } 92 | Popular Tags |