Knowledge API Legacy5 Adapter 6.0.0.Beta3

org.drools.impl.adapters
Class KnowledgeSessionConfigurationAdapter

java.lang.Object
  extended by org.drools.impl.adapters.KnowledgeSessionConfigurationAdapter
All Implemented Interfaces:
PropertiesConfiguration, KnowledgeSessionOptionsConfiguration, KnowledgeSessionConfiguration

public class KnowledgeSessionConfigurationAdapter
extends Object
implements KnowledgeSessionConfiguration


Constructor Summary
KnowledgeSessionConfigurationAdapter(org.kie.api.runtime.KieSessionConfiguration delegate)
           
 
Method Summary
 org.kie.api.runtime.KieSessionConfiguration getDelegate()
           
<T extends SingleValueKnowledgeSessionOption>
T
getOption(Class<T> option)
          Gets an option value
<T extends MultiValueKnowledgeSessionOption>
T
getOption(Class<T> option, String key)
          Gets an option value for the given option + key.
 String getProperty(String name)
          Gets a property value
<T extends KnowledgeSessionOption>
void
setOption(T option)
          Sets an option
 void setProperty(String name, String value)
          Sets a property value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KnowledgeSessionConfigurationAdapter

public KnowledgeSessionConfigurationAdapter(org.kie.api.runtime.KieSessionConfiguration delegate)
Method Detail

setOption

public <T extends KnowledgeSessionOption> void setOption(T option)
Description copied from interface: KnowledgeSessionOptionsConfiguration
Sets an option

Specified by:
setOption in interface KnowledgeSessionOptionsConfiguration
Parameters:
option - the option to be set. As options are type safe, the option itself contains the option key, and so a single parameter is enough.

getOption

public <T extends SingleValueKnowledgeSessionOption> T getOption(Class<T> option)
Description copied from interface: KnowledgeSessionOptionsConfiguration
Gets an option value

Specified by:
getOption in interface KnowledgeSessionOptionsConfiguration
Parameters:
option - the option class for the option being requested
Returns:
the Option value for the given option. Returns null if option is not configured.

getOption

public <T extends MultiValueKnowledgeSessionOption> T getOption(Class<T> option,
                                                                String key)
Description copied from interface: KnowledgeSessionOptionsConfiguration
Gets an option value for the given option + key. This method should be used for multi-value options where one option has multiple values, distinguished by a sub-key.

Specified by:
getOption in interface KnowledgeSessionOptionsConfiguration
Parameters:
option - the option class for the option being requested
key - the key for the option being requested
Returns:
the Option value for the given option + key. Returns null if option is not configured.

setProperty

public void setProperty(String name,
                        String value)
Description copied from interface: PropertiesConfiguration
Sets a property value

Specified by:
setProperty in interface PropertiesConfiguration

getProperty

public String getProperty(String name)
Description copied from interface: PropertiesConfiguration
Gets a property value

Specified by:
getProperty in interface PropertiesConfiguration
Returns:

getDelegate

public org.kie.api.runtime.KieSessionConfiguration getDelegate()

Knowledge API Legacy5 Adapter 6.0.0.Beta3

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