1 | package de.uka.ipd.sdq.pcm.transformations.builder.connectors; |
2 | |
3 | import de.uka.ipd.sdq.pcm.core.composition.AssemblyConnector; |
4 | import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceContainer; |
5 | import de.uka.ipd.sdq.pcm.transformations.builder.IComponentBuilder; |
6 | import de.uka.ipd.sdq.pcm.transformations.builder.infrastructure.BasicMiddlewareComponentBuilder; |
7 | import de.uka.ipd.sdq.pcm.transformations.builder.infrastructure.IMiddlewareInteractingComponentBuilder; |
8 | import de.uka.ipd.sdq.pcm.transformations.builder.util.PCMAndCompletionModelHolder; |
9 | |
10 | /** |
11 | * Implementation of an InnerConnectorCompletionBuilder which adds dummy components on both sides doing nothing else than delegating the |
12 | * call to the next component in the chain |
13 | * @author Snowball |
14 | * |
15 | */ |
16 | public class InnerConnectorCompletionBuilder |
17 | extends AbstractClientServerConnectorCompletionBuilder { |
18 | |
19 | public InnerConnectorCompletionBuilder( |
20 | PCMAndCompletionModelHolder models, |
21 | AssemblyConnector connector, |
22 | ResourceContainer fromResourceContainer, |
23 | ResourceContainer toResourceContainer, |
24 | IComponentBuilder innerBuilder) { |
25 | super(models, connector, fromResourceContainer, toResourceContainer, innerBuilder, "InnerConnectorCompletion"); |
26 | } |
27 | |
28 | /** |
29 | * By default, a dummy component is created which does nothing besides delegating the call. |
30 | * Override if more actions are needed |
31 | * @return |
32 | */ |
33 | @Override |
34 | protected IMiddlewareInteractingComponentBuilder createClientSideBuilder() { |
35 | return new BasicMiddlewareComponentBuilder( |
36 | myModels, |
37 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
38 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
39 | this.middlewareInterface, |
40 | this.fromResourceContainer, |
41 | "BasicMiddlewareComponent_ClientSide"); |
42 | } |
43 | |
44 | /** |
45 | * By default, a dummy component is created which does nothing besides delegating the call. |
46 | * Override if more actions are needed |
47 | * @return |
48 | */ |
49 | @Override |
50 | protected IMiddlewareInteractingComponentBuilder createServerSideBuilder() { |
51 | return new BasicMiddlewareComponentBuilder( |
52 | myModels, |
53 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
54 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
55 | this.middlewareInterface, |
56 | this.toResourceContainer, |
57 | "BasicMiddlewareComponent_ServerSide"); |
58 | } |
59 | } |