teichmann@475: package org.dive4elements.artifacts; felix@352: felix@352: /** felix@352: * DataProviders register on a Blackboard with a key (basically shouting felix@352: * "I can or know X!"). felix@352: * felix@352: * Consumers look at the blackboard and then consume data from these felix@352: * DataProvider, passing them (optional) parameterization and the blackboard felix@352: * itself. felix@352: * felix@352: * Through the blackboard-passing-when-consuming, also recursive patterns can felix@352: * be modelled (but take care, there is no in-built cycle detection). felix@352: */ felix@352: public interface DataProvider { felix@352: /** Register this DataProvider on a blackboard under a key. */ felix@352: public void register(CallContext blackboard); felix@352: felix@352: /** Provide data, given parameterization and a "blackboard". */ felix@352: public Object provideData(Object key, Object param, CallContext context); felix@352: } felix@352: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :