/** * Creates an instance. * * @param inManager the module manager instance. * @param inRequesterURN the data flow requester URN. * @param inRequests the data requests specified when requesting * this data flow. * @param inModules the modules participating in this data flow. * * @throws ModuleException if there was an error generating a flowID * for this data flow. */ DataFlow(ModuleManager inManager, ModuleURN inRequesterURN, DataRequest[] inRequests, Module[] inModules) throws ModuleException { mFlowID = generateFlowID(); mRequesterURN = inRequesterURN; mRequests = inRequests; mCouplers = new AbstractDataCoupler[inModules.length - 1]; assert inModules.length == mRequests.length; for(int i = mCouplers.length - 1; i >= 0; i--) { mCouplers[i] = mRequests[i].getCoupling().createCoupler(inManager, inModules[i], inModules[i + 1], mFlowID, mRequests[i+1].getExceptionHandler()); } }