public class IlrJ2SESessionFactory
extends ilog.rules.res.session.impl.IlrSessionFactoryBase
IlrJ2SESessionFactory class is a rule session factory for Java SE environments.
This class is a wrapper for a fully functional Java SE Execution Unit (XU). It does not depend on application server
resources.
See IlrSessionFactory for a code example that shows how to execute rules in a Java SE session.
| Constructor and Description |
|---|
IlrJ2SESessionFactory()
Creates a session factory.
|
IlrJ2SESessionFactory(IlrSessionFactoryConfig config)
Creates a session factory with a custom configuration.
|
IlrJ2SESessionFactory(java.io.PrintWriter logWriter)
Creates a session factory.
|
| Modifier and Type | Method and Description |
|---|---|
static IlrSessionFactoryConfig |
createDefaultConfig()
Creates a session factory configuration that holds default settings.
|
IlrManagementSession |
createManagementSession()
Returns a new management session.
|
IlrStatefulSession |
createStatefulSession(IlrPath rulesetPath,
java.io.Serializable userData,
java.util.Map<java.lang.String,java.lang.Object> initParameters,
boolean forceUptodate,
boolean enableInterceptor)
Returns a stateful rule session.
|
IlrStatelessSession |
createStatelessSession()
Returns a stateless rule session.
|
protected java.io.InputStream |
findXUDescriptorStream() |
void |
release()
Releases the resources that are used by this session factory.
After this method has been called, any rule session that is created by this factory and still in use may have an unpredictable behaviour. Call this method only if you no longer want to execute rule sessions and need to release the corresponding resources. |
public IlrJ2SESessionFactory()
public IlrJ2SESessionFactory(java.io.PrintWriter logWriter)
logWriter - The XU log messages will be written to this stream.public IlrJ2SESessionFactory(IlrSessionFactoryConfig config)
createDefaultConfig() to create a session factory configuration.config - a session factory configurationpublic static IlrSessionFactoryConfig createDefaultConfig()
IlrJ2SESessionFactory(IlrSessionFactoryConfig)
to create a custom session factory.public IlrStatelessSession createStatelessSession() throws IlrSessionCreationException
IlrSessionFactoryIlrSessionCreationException - if an error occurred when the
stateless session was created:public IlrStatefulSession createStatefulSession(IlrPath rulesetPath, java.io.Serializable userData, java.util.Map<java.lang.String,java.lang.Object> initParameters, boolean forceUptodate, boolean enableInterceptor) throws IlrSessionCreationException
IlrSessionFactoryIlrSessionCreationException - if an error occurred when the
stateful session was created.rulesetPath - The ruleset path for the session.userData - A serializable object supplied by the user.initParameters - Initialization parameters used by the interceptors if necessary.forceUptodate - Set to true to indicate that the
latest version of the ruleset must be used.enableInterceptor - Set to true to indicate that the interceptors should be enabledpublic IlrManagementSession createManagementSession() throws IlrSessionCreationException
IlrSessionFactoryIlrSessionCreationException - if an error occurs when the
management session is created.protected java.io.InputStream findXUDescriptorStream()
public void release()
throws java.lang.IllegalStateException
java.lang.IllegalStateException© Copyright IBM Corp. 1987, 2017