|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.SessionConfiguration
public class SessionConfiguration
SessionConfiguration
A class to store Session related configuration. It must be used at session instantiation time
or not used at all.
This class will automatically load default values from system properties, so if you want to set
a default configuration value for all your new sessions, you can simply set the property as
a System property.
After the Session is created, it makes the configuration immutable and there is no way to make it
mutable again. This is to avoid inconsistent behavior inside session.
NOTE: This API is under review and may change in the future.
drools.keepReference =
Constructor Summary
SessionConfiguration()
Creates a new session configuration with default configuration options.
SessionConfiguration(ClassLoader... classLoader)
SessionConfiguration(Properties properties)
Creates a new session configuration using the provided properties
as configuration options.
Method Summary
void
addProperties(Properties properties)
ClassLoader
getClassLoader()
ClockType
getClockType()
CommandService
getCommandService(org.drools.KnowledgeBase kbase,
org.drools.runtime.Environment environment)
static SessionConfiguration
getDefaultInstance()
<T extends org.drools.runtime.conf.SingleValueKnowledgeSessionOption>
TgetOption(Class<T> option)
<T extends org.drools.runtime.conf.MultiValueKnowledgeSessionOption>
TgetOption(Class<T> option,
String key)
String
getProcessInstanceManagerFactory()
String
getProperty(String name)
org.drools.runtime.conf.QueryListenerOption
getQueryListenerOption()
String
getSignalManagerFactory()
Map<String,org.drools.runtime.process.WorkItemHandler>
getWorkItemHandlers()
WorkItemManagerFactory
getWorkItemManagerFactory()
boolean
isImmutable()
Returns true if this configuration object is immutable or false otherwise.
boolean
isKeepReference()
void
makeImmutable()
Makes the configuration object immutable.
TimerService
newTimerService()
void
readExternal(ObjectInput in)
void
setClassLoader(org.drools.util.CompositeClassLoader classLoader)
void
setClockType(ClockType clockType)
void
setKeepReference(boolean keepReference)
<T extends org.drools.runtime.conf.KnowledgeSessionOption>
voidsetOption(T option)
void
setProperty(String name,
String value)
void
writeExternal(ObjectOutput out)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SessionConfiguration
public SessionConfiguration(Properties properties)
properties
-
SessionConfiguration
public SessionConfiguration()
SessionConfiguration
public SessionConfiguration(ClassLoader... classLoader)
Method Detail
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal
in interface Externalizable
IOException
getDefaultInstance
public static SessionConfiguration getDefaultInstance()
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
addProperties
public void addProperties(Properties properties)
setProperty
public void setProperty(String name,
String value)
setProperty
in interface org.drools.PropertiesConfiguration
getProperty
public String getProperty(String name)
getProperty
in interface org.drools.PropertiesConfiguration
makeImmutable
public void makeImmutable()
isImmutable
public boolean isImmutable()
setKeepReference
public void setKeepReference(boolean keepReference)
isKeepReference
public boolean isKeepReference()
getClockType
public ClockType getClockType()
setClockType
public void setClockType(ClockType clockType)
getWorkItemHandlers
public Map<String,org.drools.runtime.process.WorkItemHandler> getWorkItemHandlers()
getWorkItemManagerFactory
public WorkItemManagerFactory getWorkItemManagerFactory()
getProcessInstanceManagerFactory
public String getProcessInstanceManagerFactory()
getSignalManagerFactory
public String getSignalManagerFactory()
getCommandService
public CommandService getCommandService(org.drools.KnowledgeBase kbase,
org.drools.runtime.Environment environment)
newTimerService
public TimerService newTimerService()
getOption
public <T extends org.drools.runtime.conf.SingleValueKnowledgeSessionOption> T getOption(Class<T> option)
getOption
in interface org.drools.runtime.conf.KnowledgeSessionOptionsConfiguration
getOption
public <T extends org.drools.runtime.conf.MultiValueKnowledgeSessionOption> T getOption(Class<T> option,
String key)
getOption
in interface org.drools.runtime.conf.KnowledgeSessionOptionsConfiguration
setOption
public <T extends org.drools.runtime.conf.KnowledgeSessionOption> void setOption(T option)
setOption
in interface org.drools.runtime.conf.KnowledgeSessionOptionsConfiguration
getClassLoader
public ClassLoader getClassLoader()
setClassLoader
public void setClassLoader(org.drools.util.CompositeClassLoader classLoader)
getQueryListenerOption
public org.drools.runtime.conf.QueryListenerOption getQueryListenerOption()
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.