Drools :: Core 6.2.0.CR4

org.drools.core
Class SessionConfiguration

java.lang.Object
  extended by org.drools.core.SessionConfiguration
All Implemented Interfaces:
Externalizable, Serializable, org.kie.api.PropertiesConfiguration, org.kie.api.runtime.conf.KieSessionOptionsConfiguration, org.kie.api.runtime.KieSessionConfiguration

public class SessionConfiguration
extends Object
implements org.kie.api.runtime.KieSessionConfiguration, Externalizable

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 = drools.clockType =

See Also:
Serialized Form

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.
SessionConfiguration(Properties properties, ClassLoader classLoader)
           
 
Method Summary
 void addDefaultProperties(Properties properties)
           
 boolean equals(Object o)
           
 BeliefSystemType getBeliefSystemType()
           
 ClockType getClockType()
           
 CommandService getCommandService(org.kie.internal.KnowledgeBase kbase, org.kie.api.runtime.Environment environment)
           
static SessionConfiguration getDefaultInstance()
           
 org.kie.internal.runtime.conf.ForceEagerActivationFilter getForceEagerActivationFilter()
           
<T extends org.kie.api.runtime.conf.SingleValueKieSessionOption>
T
getOption(Class<T> option)
           
<T extends org.kie.api.runtime.conf.MultiValueKieSessionOption>
T
getOption(Class<T> option, String key)
           
 String getProcessInstanceManagerFactory()
           
 String getProperty(String name)
           
 org.kie.api.runtime.conf.QueryListenerOption getQueryListenerOption()
           
 String getSignalManagerFactory()
           
 org.kie.api.runtime.conf.TimedRuleExecutionFilter getTimedRuleExecutionFilter()
           
 TimerJobFactoryManager getTimerJobFactoryManager()
           
 TimerJobFactoryType getTimerJobFactoryType()
           
 Map<String,org.kie.api.runtime.process.WorkItemHandler> getWorkItemHandlers()
           
 Map<String,org.kie.api.runtime.process.WorkItemHandler> getWorkItemHandlers(Map<String,Object> params)
           
 WorkItemManagerFactory getWorkItemManagerFactory()
           
 int hashCode()
           
 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 setBeliefSystemType(BeliefSystemType beliefSystemType)
           
 void setClockType(ClockType clockType)
           
 void setForceEagerActivationFilter(org.kie.internal.runtime.conf.ForceEagerActivationFilter forceEagerActivationFilter)
           
 void setKeepReference(boolean keepReference)
           
<T extends org.kie.api.runtime.conf.KieSessionOption>
void
setOption(T option)
           
 void setProperty(String name, String value)
           
 void setTimedRuleExecutionFilter(org.kie.api.runtime.conf.TimedRuleExecutionFilter timedRuleExecutionFilter)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionConfiguration

public SessionConfiguration(Properties properties)
Creates a new session configuration using the provided properties as configuration options.

Parameters:
properties -

SessionConfiguration

public SessionConfiguration(Properties properties,
                            ClassLoader classLoader)

SessionConfiguration

public SessionConfiguration()
Creates a new session configuration with default configuration options.


SessionConfiguration

public SessionConfiguration(ClassLoader... classLoader)
Method Detail

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

getDefaultInstance

public static SessionConfiguration getDefaultInstance()

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

addDefaultProperties

public void addDefaultProperties(Properties properties)

setProperty

public void setProperty(String name,
                        String value)
Specified by:
setProperty in interface org.kie.api.PropertiesConfiguration

getProperty

public String getProperty(String name)
Specified by:
getProperty in interface org.kie.api.PropertiesConfiguration

makeImmutable

public void makeImmutable()
Makes the configuration object immutable. Once it becomes immutable, there is no way to make it mutable again. This is done to keep consistency.


isImmutable

public boolean isImmutable()
Returns true if this configuration object is immutable or false otherwise.

Returns:

setKeepReference

public void setKeepReference(boolean keepReference)

isKeepReference

public boolean isKeepReference()

setForceEagerActivationFilter

public void setForceEagerActivationFilter(org.kie.internal.runtime.conf.ForceEagerActivationFilter forceEagerActivationFilter)

getForceEagerActivationFilter

public org.kie.internal.runtime.conf.ForceEagerActivationFilter getForceEagerActivationFilter()

setTimedRuleExecutionFilter

public void setTimedRuleExecutionFilter(org.kie.api.runtime.conf.TimedRuleExecutionFilter timedRuleExecutionFilter)

getTimedRuleExecutionFilter

public org.kie.api.runtime.conf.TimedRuleExecutionFilter getTimedRuleExecutionFilter()

getBeliefSystemType

public BeliefSystemType getBeliefSystemType()

setBeliefSystemType

public void setBeliefSystemType(BeliefSystemType beliefSystemType)

getClockType

public ClockType getClockType()

setClockType

public void setClockType(ClockType clockType)

getTimerJobFactoryManager

public TimerJobFactoryManager getTimerJobFactoryManager()

getTimerJobFactoryType

public TimerJobFactoryType getTimerJobFactoryType()

getWorkItemHandlers

public Map<String,org.kie.api.runtime.process.WorkItemHandler> getWorkItemHandlers()

getWorkItemHandlers

public Map<String,org.kie.api.runtime.process.WorkItemHandler> getWorkItemHandlers(Map<String,Object> params)

getWorkItemManagerFactory

public WorkItemManagerFactory getWorkItemManagerFactory()

getProcessInstanceManagerFactory

public String getProcessInstanceManagerFactory()

getSignalManagerFactory

public String getSignalManagerFactory()

getCommandService

public CommandService getCommandService(org.kie.internal.KnowledgeBase kbase,
                                        org.kie.api.runtime.Environment environment)

newTimerService

public TimerService newTimerService()

getOption

public <T extends org.kie.api.runtime.conf.SingleValueKieSessionOption> T getOption(Class<T> option)
Specified by:
getOption in interface org.kie.api.runtime.conf.KieSessionOptionsConfiguration

getOption

public <T extends org.kie.api.runtime.conf.MultiValueKieSessionOption> T getOption(Class<T> option,
                                                                                   String key)
Specified by:
getOption in interface org.kie.api.runtime.conf.KieSessionOptionsConfiguration

setOption

public <T extends org.kie.api.runtime.conf.KieSessionOption> void setOption(T option)
Specified by:
setOption in interface org.kie.api.runtime.conf.KieSessionOptionsConfiguration

getQueryListenerOption

public org.kie.api.runtime.conf.QueryListenerOption getQueryListenerOption()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Drools :: Core 6.2.0.CR4

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.