1 | package de.uka.ipd.sdq.simucomframework.usage; |
2 | |
3 | import de.uka.ipd.sdq.simucomframework.model.SimuComModel; |
4 | |
5 | /** |
6 | * A factory for creating open workload users |
7 | * |
8 | * @author Steffen Becker |
9 | * |
10 | */ |
11 | public abstract class OpenWorkloadUserFactory implements IUserFactory { |
12 | |
13 | private SimuComModel model; |
14 | |
15 | public OpenWorkloadUserFactory(SimuComModel model) { |
16 | this.model = model; |
17 | } |
18 | |
19 | /* |
20 | * (non-Javadoc) |
21 | * |
22 | * @see de.uka.ipd.sdq.simucomframework.usage.IUserFactory#createUser() |
23 | */ |
24 | public IUser createUser(final String usageScenarioId) { |
25 | IScenarioRunner scenarioRunner = this.createScenarioRunner(); |
26 | return new OpenWorkloadUser(model, "OpenUser", scenarioRunner, |
27 | usageScenarioId); |
28 | } |
29 | |
30 | /** |
31 | * Template method filled in by the generator. Returns an object |
32 | * representing the user behaviour needed for the new users. |
33 | * |
34 | * @return The behaviour of the users created by this factory |
35 | */ |
36 | public abstract IScenarioRunner createScenarioRunner(); |
37 | |
38 | } |