SimulationServiceFactory
- java.lang.Object
-
- com.fico.xpress.simulation.internal.SimulationServiceFactory
-
@Configuration public class SimulationServiceFactory extends Object
Configuration class to initialize the rule engine server and thread pool to support concurrent rule processing requests
-
-
Constructor Summary
Constructor Description SimulationServiceFactory()
-
Method Summary
Modifier and Type Method Description SimulationPlugincreate(SimulationPluginConfig simulationPluginConfig)The function creates a bean that holds the RuleServer instance and automatically initialize it by calling its init() method.Map<String,SimulationPlugin>getBeans()Retrieves the list of services that can be executed.
-
-
-
Method Detail
-
create
@Bean @Scope("prototype") @Primary public SimulationPlugin create(SimulationPluginConfig simulationPluginConfig) throws SimulationExceptionThe function creates a bean that holds the RuleServer instance and automatically initialize it by calling its init() method. The actual creation of the bean is performed in the constructRuleServer() method.Note the scope of the bean is 'prototype' which means each time the bean 'createRuleServer' is retrieved the function will be called, but remark the consturctRuleServer() method is the one actually getting the RuleServer object instance. It means that depending on the scope definition of the RuleServer bean that is retrieved, it may be the same object instance (singleton) or a different one (prototype).
- Parameters:
-
simulationPluginConfig- The rule server configuration information - Returns:
- The instance of the server
- Throws:
-
SimulationException- Exceptions are thrown in case the configuration is invalid or if the server cannot be instanciated.
-
getBeans
public Map<String,SimulationPlugin> getBeans()
Retrieves the list of services that can be executed. The method will list all the beans that implements theSimulationPlugininterface and are present in package 'com.fico.xpress'.- Returns:
- List of RuleServerClassNames implementing the IRuleExecutor interface.
-
-
© 2001-2022 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
