Package dev.zemco.codegame.execution
Class ProgramExecutionService
java.lang.Object
dev.zemco.codegame.execution.ProgramExecutionService
- All Implemented Interfaces:
IExecutionService
Implementation of business logic related to execution.
This implementation uses
ProgramExecutionEngine for solution program execution.- Author:
- Erik Zemčík
-
Constructor Summary
ConstructorsConstructorDescriptionProgramExecutionService(IMemoryService memoryService, IInputSourceFactory inputSourceFactory, IOutputSinkFactory outputSinkFactory) Creates an instance ofProgramExecutionEngine. -
Method Summary
Modifier and TypeMethodDescriptiongetExecutionContextForProblemCaseSolution(Program solution, ProblemCase problemCase)
-
Constructor Details
-
ProgramExecutionService
public ProgramExecutionService(IMemoryService memoryService, IInputSourceFactory inputSourceFactory, IOutputSinkFactory outputSinkFactory) Creates an instance ofProgramExecutionEngine.- Parameters:
memoryService- service used for configuringmemoryinputSourceFactory- factory used for creatinginput sourcesoutputSinkFactory- factory used for creatingoutput sinks- Throws:
IllegalArgumentException- if any argument isnull
-
-
Method Details
-
getExecutionContextForProblemCaseSolution
public IExecutionContext getExecutionContextForProblemCaseSolution(Program solution, ProblemCase problemCase) Description copied from interface:IExecutionService- Specified by:
getExecutionContextForProblemCaseSolutionin interfaceIExecutionService- Parameters:
solution- program to executeproblemCase- problem case to execute against- Returns:
- configured execution context
-