Package org.evrete
Class KnowledgeService
java.lang.Object
org.evrete.KnowledgeService
KnowledgeService is a root element of every Evrete-based application.
It holds initial Configuration, security settings, references to all
required SPI implementations, and an instance of Java ExecutorService.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.evrete.runtime.async.ForkJoinExecutornewKnowledge(String dsl, InputStream... resources) newKnowledge(String dsl, Reader... resources) newKnowledge(String dsl, Class<?>... resources) This is a convenience method.newKnowledge(String dsl, String... resources) newKnowledge(String dsl, URL... resources) newKnowledge(String dsl, TypeResolver typeResolver, InputStream... resources) newKnowledge(String dsl, TypeResolver typeResolver, Reader... resources) newKnowledge(String dsl, TypeResolver typeResolver, Class<?>... resources) This is a convenience method.newKnowledge(String dsl, TypeResolver typeResolver, URL... resources) newKnowledge(TypeResolver typeResolver) This method is a shorthand fornewKnowledge().newStatefulSession()which returns an empty session instance.This method is a shorthand fornewKnowledge().newStatelessSession()which returns an empty session instance.voidsetClassLoader(ClassLoader classLoader) voidshutdown()
-
Constructor Details
-
KnowledgeService
-
KnowledgeService
public KnowledgeService()
-
-
Method Details
-
getSecurity
-
getClassLoader
-
setClassLoader
-
newKnowledge
- Returns:
- an empty
Knowledgeinstance
-
newKnowledge
- Returns:
- an empty
Knowledgeinstance
-
newTypeResolver
-
newKnowledge
- Parameters:
dsl- DSL nameresources- DSL resources- Returns:
- a
Knowledgeinstance built by DSL provider from given resources. - Throws:
IOException
-
newKnowledge
public Knowledge newKnowledge(String dsl, TypeResolver typeResolver, URL... resources) throws IOException - Parameters:
dsl- DSL nametypeResolver- TypeResolver to useresources- DSL resources- Returns:
- a
Knowledgeinstance built by DSL provider from given resources. - Throws:
IOException
-
newKnowledge
- Parameters:
dsl- DSL nameresources- DSL resources- Returns:
- a
Knowledgeinstance built by DSL provider from given resources. - Throws:
IOException
-
newKnowledge
public Knowledge newKnowledge(String dsl, TypeResolver typeResolver, Reader... resources) throws IOException - Parameters:
dsl- DSL nametypeResolver- TypeResolver to useresources- DSL resources- Returns:
- a
Knowledgeinstance built by DSL provider from given resources. - Throws:
IOException
-
newKnowledge
- Parameters:
dsl- DSL nameresources- DSL resources- Returns:
- a
Knowledgeinstance built by DSL provider from given resources. - Throws:
IOException
-
newKnowledge
public Knowledge newKnowledge(String dsl, TypeResolver typeResolver, InputStream... resources) throws IOException - Parameters:
dsl- DSL nametypeResolver- TypeResolver to useresources- DSL resources- Returns:
- a
Knowledgeinstance built by DSL provider from given resources. - Throws:
IOException
-
newKnowledge
This is a convenience method. The implementation gets URLs of each class and calls
newKnowledge(String, URL...)- Parameters:
dsl- DSL nameresources- DSL resources- Returns:
- a
Knowledgeinstance built by DSL provider from given resources. - Throws:
IOException
-
newKnowledge
public Knowledge newKnowledge(String dsl, TypeResolver typeResolver, Class<?>... resources) throws IOException This is a convenience method. The implementation gets URLs of each class and calls
newKnowledge(String, TypeResolver, URL...)- Parameters:
dsl- DSL nametypeResolver- TypeResolver to useresources- DSL resources- Returns:
- a
Knowledgeinstance built by DSL provider from given resources. - Throws:
IOException
-
shutdown
public void shutdown() -
getExecutor
public org.evrete.runtime.async.ForkJoinExecutor getExecutor() -
getConfiguration
-
getMemoryFactoryProvider
-
getExpressionResolverProvider
-
getLiteralRhsCompiler
-
getTypeResolverProvider
-
newKnowledge
- Throws:
IOException
-
newStatefulSession
This method is a shorthand for
newKnowledge().newStatefulSession()which returns an empty session instance.- Returns:
- an empty
StatefulSession
-
newStatelessSession
This method is a shorthand for
newKnowledge().newStatelessSession()which returns an empty session instance.- Returns:
- an empty
StatelessSession
-