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.IMiddlewareInteractingComponentBuilder; |
7 | import de.uka.ipd.sdq.pcm.transformations.builder.infrastructure.MarshallingComponentBuilder; |
8 | import de.uka.ipd.sdq.pcm.transformations.builder.util.PCMAndCompletionModelHolder; |
9 | |
10 | /** |
11 | * Implementation of an InnerConnectorCompletionBuilder which adds the impact of marshalling parameters |
12 | * @author Snowball |
13 | * |
14 | */ |
15 | public class MarshallingConnectorCompletionBuilder |
16 | extends AbstractClientServerConnectorCompletionBuilder { |
17 | |
18 | public MarshallingConnectorCompletionBuilder( |
19 | PCMAndCompletionModelHolder models, |
20 | AssemblyConnector connector, |
21 | ResourceContainer fromResourceContainer, |
22 | ResourceContainer toResourceContainer, |
23 | IComponentBuilder innerBuilder) { |
24 | super(models, connector, fromResourceContainer, toResourceContainer, innerBuilder, "MarshallingConnectorComponen"); |
25 | } |
26 | |
27 | /** |
28 | * By default, a dummy component is created which does nothing besides delegating the call. |
29 | * Override if more actions are needed |
30 | * @return |
31 | */ |
32 | @Override |
33 | protected IMiddlewareInteractingComponentBuilder createClientSideBuilder() { |
34 | return new MarshallingComponentBuilder( |
35 | myModels, |
36 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
37 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
38 | this.middlewareInterface, |
39 | fromResourceContainer, |
40 | MarshallingComponentBuilder.MarshallerSide.CLIENT); |
41 | } |
42 | |
43 | /** |
44 | * By default, a dummy component is created which does nothing besides delegating the call. |
45 | * Override if more actions are needed |
46 | * @return |
47 | */ |
48 | @Override |
49 | protected IMiddlewareInteractingComponentBuilder createServerSideBuilder() { |
50 | return new MarshallingComponentBuilder( |
51 | myModels, |
52 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
53 | this.connectorToReplace.getRequiredRole_AssemblyConnector().getRequiredInterface__OperationRequiredRole(), |
54 | this.middlewareInterface, |
55 | toResourceContainer, |
56 | MarshallingComponentBuilder.MarshallerSide.SERVER); |
57 | } |
58 | } |