ilog.rules.res.session

Class IlrJ2SESessionFactory

  • java.lang.Object
    • ilog.rules.res.session.impl.IlrSessionFactoryBase
      • ilog.rules.res.session.IlrJ2SESessionFactory
  • All Implemented Interfaces:
    IlrSessionFactory


    public class IlrJ2SESessionFactory
    extends ilog.rules.res.session.impl.IlrSessionFactoryBase
    The 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.

    Code example

    See IlrSessionFactory for a code example that shows how to execute rules in a Java SE session.

    Since:
    7.0
    • Method Summary

      Methods 
      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.
      • Methods inherited from class ilog.rules.res.session.impl.IlrSessionFactoryBase

        createRequest, createStatefulSession, createTraceDAOFactory, getXUInfo, isInterceptorEnabled, setInterceptorEnabled
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IlrJ2SESessionFactory

        public IlrJ2SESessionFactory()
        Creates a session factory.
      • IlrJ2SESessionFactory

        public IlrJ2SESessionFactory(java.io.PrintWriter logWriter)
        Creates a session factory.
        Since:
        8.6
        Parameters:
        logWriter - The XU log messages will be written to this stream.
      • IlrJ2SESessionFactory

        public IlrJ2SESessionFactory(IlrSessionFactoryConfig config)
        Creates a session factory with a custom configuration. Use createDefaultConfig() to create a session factory configuration.
        Parameters:
        config - a session factory configuration
    • Method Detail

      • createDefaultConfig

        public static IlrSessionFactoryConfig createDefaultConfig()
        Creates a session factory configuration that holds default settings. Use this method in conjunction with IlrJ2SESessionFactory(IlrSessionFactoryConfig) to create a custom session factory.
        Since:
        8.0
        Returns:
        a session factory configuration that holds default settings
      • createStatefulSession

        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
        Description copied from interface: IlrSessionFactory
        Returns a stateful rule session.
        Throws:
        IlrSessionCreationException - if an error occurred when the stateful session was created.
        Parameters:
        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 enabled
        Returns:
        A new stateful session.
      • findXUDescriptorStream

        protected java.io.InputStream findXUDescriptorStream()
      • release

        public void release()
                     throws java.lang.IllegalStateException
        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.
        Throws:
        java.lang.IllegalStateException

© Copyright IBM Corp. 1987, 2020