Package org.kie.internal.runtime.manager
Interface SessionFactory
-
public interface SessionFactoryFactory that producesKieSessioninstances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the factory and releases all resourcesorg.kie.api.runtime.KieSessionfindKieSessionById(java.lang.Long sessionId)LoadsKieSessionform data store (such as db) based on given id.org.kie.api.runtime.KieSessionnewKieSession()Produces new instance ofKieSessionvoidonDispose(java.lang.Long sessionId)Invoked when runtime engine is about to be disposed
-
-
-
Method Detail
-
newKieSession
org.kie.api.runtime.KieSession newKieSession()
Produces new instance ofKieSession- Returns:
- new instance of
KieSession
-
findKieSessionById
org.kie.api.runtime.KieSession findKieSessionById(java.lang.Long sessionId)
LoadsKieSessionform data store (such as db) based on given id.- Parameters:
sessionId- identifier of ksession- Returns:
- loaded instance of
KieSession - Throws:
java.lang.RuntimeException- in case session cannot be loaded
-
close
void close()
Closes the factory and releases all resources
-
onDispose
void onDispose(java.lang.Long sessionId)
Invoked when runtime engine is about to be disposed- Parameters:
sessionId- ksession id that is disposed.
-
-