/** * Converts this request to a string data request instance. * The returned instance is similar to this instance except * that the request data is converted to string using its * <code>toString()</code> method. * * @return the equivalent string data request. */ StringDataRequest toStringRequest() { return new StringDataRequest(getRequestURN(), getCoupling(), getData() == null ? null : getData().toString()); } /* (non-Javadoc)
/** * 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()); } }