Class DefaultSimuLizarTransmissionInterpreter<NodeType,PayloadType>
java.lang.Object
org.palladiosimulator.simulizar.interpreter.linking.impl.DefaultSimuLizarTransmissionInterpreter<NodeType,PayloadType>
- Type Parameters:
NodeType
- the type of nodes supported by the transmission interpreter. For this implementation the supported node type is determined by the usedILinkingResourceRouter
.PayloadType
- the type of supported payloads. For this implementation the supported payload type is determined by the usedITransmissionPayloadDemandCalculator
and theITransmissionSimulationStrategy
.
- All Implemented Interfaces:
ITransmissionInterpreter<NodeType,
PayloadType, InterpreterDefaultContext>
public class DefaultSimuLizarTransmissionInterpreter<NodeType,PayloadType>
extends Object
implements ITransmissionInterpreter<NodeType,PayloadType,InterpreterDefaultContext>
The
DefaultSimuLizarTransmissionInterpreter
encapsulated the default behavior of how link
transmissions are simulated in SimuLizar. The behavior encapsulated three stages:
- calculate the demand of the given payload using an
ITransmissionPayloadDemandCalculator
. - determine a route of links using a
ILinkingResourceRouter
- For each of the links of the route use a
ITransmissionSimulationStrategy
to issue the calculated demand.
-
Constructor Summary
ConstructorDescriptionDefaultSimuLizarTransmissionInterpreter
(ILinkingResourceRouter<NodeType, EntityReference<org.palladiosimulator.pcm.resourceenvironment.LinkingResource>> router, ITransmissionPayloadDemandCalculator<PayloadType, Double> calculator, ITransmissionSimulationStrategy<EntityReference<org.palladiosimulator.pcm.resourceenvironment.LinkingResource>, Double, InterpreterDefaultContext> transmissionSimulation, InterpreterResultHandler issueHandler, InterpreterResultMerger resultMerger, PreInterpretationBehaviorManager pibManager) -
Method Summary
Modifier and TypeMethodDescriptioninterpretTransmission
(NodeType source, NodeType target, PayloadType payload, InterpreterDefaultContext context) Simulate a transmission of a payload between source and target node in the context of the current user.
-
Constructor Details
-
DefaultSimuLizarTransmissionInterpreter
@Inject public DefaultSimuLizarTransmissionInterpreter(ILinkingResourceRouter<NodeType, EntityReference<org.palladiosimulator.pcm.resourceenvironment.LinkingResource>> router, ITransmissionPayloadDemandCalculator<PayloadType, Double> calculator, ITransmissionSimulationStrategy<EntityReference<org.palladiosimulator.pcm.resourceenvironment.LinkingResource>, Double, InterpreterDefaultContext> transmissionSimulation, InterpreterResultHandler issueHandler, InterpreterResultMerger resultMerger, PreInterpretationBehaviorManager pibManager)
-
-
Method Details
-
interpretTransmission
public InterpreterResult interpretTransmission(NodeType source, NodeType target, PayloadType payload, InterpreterDefaultContext context) Description copied from interface:ITransmissionInterpreter
Simulate a transmission of a payload between source and target node in the context of the current user. This method blocks until the transmission is fulfilled.- Specified by:
interpretTransmission
in interfaceITransmissionInterpreter<NodeType,
PayloadType, InterpreterDefaultContext> - Parameters:
source
- the node where the transmission is originatingtarget
- the target node of the transmissionpayload
- the payload which is transmittedcontext
- the context representing the current user thread of activity
-