Mercurial > dive4elements > framework
comparison artifacts/src/main/java/de/intevation/artifacts/DataProvider.java @ 352:9c8d91708d28
Added DataProvider interface (interface for inter-facet communication).
artifacts/trunk@3330 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 30 Nov 2011 08:20:15 +0000 |
parents | |
children | ab3900303f25 |
comparison
equal
deleted
inserted
replaced
351:eb1136134d09 | 352:9c8d91708d28 |
---|---|
1 package de.intevation.artifacts; | |
2 | |
3 import de.intevation.artifacts.CallContext; | |
4 | |
5 /** | |
6 * DataProviders register on a Blackboard with a key (basically shouting | |
7 * "I can or know X!"). | |
8 * | |
9 * Consumers look at the blackboard and then consume data from these | |
10 * DataProvider, passing them (optional) parameterization and the blackboard | |
11 * itself. | |
12 * | |
13 * Through the blackboard-passing-when-consuming, also recursive patterns can | |
14 * be modelled (but take care, there is no in-built cycle detection). | |
15 */ | |
16 public interface DataProvider { | |
17 /** Register this DataProvider on a blackboard under a key. */ | |
18 public void register(CallContext blackboard); | |
19 | |
20 /** Provide data, given parameterization and a "blackboard". */ | |
21 public Object provideData(Object key, Object param, CallContext context); | |
22 } | |
23 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |