aboutsummaryrefslogtreecommitdiffstats
path: root/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java
diff options
context:
space:
mode:
Diffstat (limited to 'policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java')
-rw-r--r--policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java42
1 files changed, 9 insertions, 33 deletions
diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java b/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java
index fb17b10a..1f8a61c6 100644
--- a/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java
+++ b/policy-core/src/main/java/org/onap/policy/drools/core/PolicySession.java
@@ -22,6 +22,7 @@
package org.onap.policy.drools.core;
import java.util.concurrent.ConcurrentHashMap;
+import lombok.Getter;
import org.kie.api.event.rule.AfterMatchFiredEvent;
import org.kie.api.event.rule.AgendaEventListener;
import org.kie.api.event.rule.AgendaGroupPoppedEvent;
@@ -52,11 +53,18 @@ public class PolicySession
implements AgendaEventListener, RuleRuntimeEventListener {
// get an instance of logger
private static Logger logger = LoggerFactory.getLogger(PolicySession.class);
+
+ // supports 'getCurrentSession()' method
+ private static ThreadLocal<PolicySession> policySess =
+ new ThreadLocal<>();
+
// name of the 'PolicySession' and associated 'KieSession'
+ @Getter
private String name;
// the associated 'PolicyContainer', which may have additional
// 'PolicySession' instances in addition to this one
+ @Getter
private PolicyContainer container;
// maps feature objects to per-PolicyContainer data
@@ -64,15 +72,12 @@ public class PolicySession
new ConcurrentHashMap<>();
// associated 'KieSession' instance
+ @Getter
private KieSession kieSession;
// if not 'null', this is the thread model processing the 'KieSession'
private ThreadModel threadModel = null;
- // supports 'getCurrentSession()' method
- private static ThreadLocal<PolicySession> policySess =
- new ThreadLocal<>();
-
/**
* Internal constructor - create a 'PolicySession' instance.
*
@@ -90,35 +95,6 @@ public class PolicySession
}
/**
- * Get policy container.
- *
- * @return the 'PolicyContainer' object containing this session
- */
- public PolicyContainer getPolicyContainer() {
- return container;
- }
-
- /**
- * Get Kie Session.
- *
- * @return the associated 'KieSession' instance
- */
- public KieSession getKieSession() {
- return kieSession;
- }
-
- /**
- * Get name.
- *
- * @return the local name of this session, which should either match the
- * name specified in 'kmodule.xml' file associated with this session, or the
- * name passed on the 'PolicyContainer.adoptKieSession' method.
- */
- public String getName() {
- return name;
- }
-
- /**
* Get full name.
*
* @return the 'PolicyContainer' name, followed by ':', followed by the