View Javadoc

1   /*
2    * $Id: DroolsSessionData.java 20895 2011-01-05 13:16:57Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.module.drools;
12  
13  import org.drools.logger.KnowledgeRuntimeLogger;
14  import org.drools.runtime.StatefulKnowledgeSession;
15  
16  /**
17   * A simple data structure which contains the KnowledgeSession plus any other stateful information.
18   */
19  public class DroolsSessionData
20  {
21      private final StatefulKnowledgeSession session;
22      
23      private final KnowledgeRuntimeLogger logger;
24  
25      public DroolsSessionData(StatefulKnowledgeSession session, KnowledgeRuntimeLogger logger)
26      {
27          this.session = session;
28          this.logger = logger;
29      }
30      
31      public StatefulKnowledgeSession getSession()
32      {
33          return session;
34      }
35  
36      public KnowledgeRuntimeLogger getLogger()
37      {
38          return logger;
39      }
40  }
41  
42