protected Context(Configuration configuration, AbstractFunctionType<?> functionType, Map<String, String> properties) {
super();
this.properties = properties;
this.fileManagerDirectory = FileHelper.createTempFolder();
grid = new Grid(fileManagerDirectory, 0);
client = new GridClientImpl(grid);
FunctionTypeRegistry functionTypeRegistry = new FunctionTypeRegistryImpl(new FileResolver(new AttachmentManager(configuration)), client);
functionTypeRegistry.registerFunctionType(functionType);
try {
functionExecutionService = new FunctionExecutionServiceImpl(client, functionTypeRegistry, new DynamicBeanResolver(new DynamicValueResolver(new ExpressionHandler())));
} catch (FunctionExecutionServiceException e) {
throw new RuntimeException("Error while creating function execution service", e);
}
}