KIE API 6.0.0.CR2

org.kie.api.builder.model
Interface KieSessionModel


public interface KieSessionModel

KieSessionModel is a model allowing to programmatically define a KieSession

See Also:
KieSession

Nested Class Summary
static class KieSessionModel.KieSessionType
           
 
Method Summary
 ClockTypeOption getClockType()
          Returns the ClockType of this KieSessionModel
 List<ListenerModel> getListenerModels()
          Returns all the ListenerModels defined for this KieSessionModel
 String getName()
          Returns the name of the KieSession defined by this KieSessionModel
 String getScope()
          Returns the CDI scope of this KieSessionModel
 KieSessionModel.KieSessionType getType()
          Returns the type of this KieSessionModel
 List<WorkItemHandlerModel> getWorkItemHandlerModels()
          Returns all the WorkItemHandlerModels defined for this KieSessionModel
 boolean isDefault()
          Returns true if this KieSessionModel is the default one
 ListenerModel newListenerModel(String type, ListenerModel.Kind kind)
          Creates a new ListenerModel of the given type (i.e. the name of the class implementing it) and kind and add it to this KieSessionModel
 WorkItemHandlerModel newWorkItemHandlerModel(String name, String type)
          Creates a new WorkItemHandlerModel of the given type (i.e. the name of the class implementing it) and add it to this KieSessionModel
 KieSessionModel setClockType(ClockTypeOption clockType)
          Sets the EqualityBehavior for this KieSessionModel.
 KieSessionModel setDefault(boolean isDefault)
          Sets the KieSession generated from this KieSessionModel as the default one, i.e. the one that can be loaded from the KieContainer without having to pass its name.
 KieSessionModel setScope(String scope)
          Sets the CDI scope for this KieSessionModel Default is javax.enterprise.context.ApplicationScoped
 KieSessionModel setType(KieSessionModel.KieSessionType type)
          Sets the type for this KieSessionModel.
 

Method Detail

getName

String getName()
Returns the name of the KieSession defined by this KieSessionModel


getType

KieSessionModel.KieSessionType getType()
Returns the type of this KieSessionModel


setType

KieSessionModel setType(KieSessionModel.KieSessionType type)
Sets the type for this KieSessionModel. Default is STATEFUL


getClockType

ClockTypeOption getClockType()
Returns the ClockType of this KieSessionModel


setClockType

KieSessionModel setClockType(ClockTypeOption clockType)
Sets the EqualityBehavior for this KieSessionModel. Default is realtime


newListenerModel

ListenerModel newListenerModel(String type,
                               ListenerModel.Kind kind)
Creates a new ListenerModel of the given type (i.e. the name of the class implementing it) and kind and add it to this KieSessionModel


getListenerModels

List<ListenerModel> getListenerModels()
Returns all the ListenerModels defined for this KieSessionModel


newWorkItemHandlerModel

WorkItemHandlerModel newWorkItemHandlerModel(String name,
                                             String type)
Creates a new WorkItemHandlerModel of the given type (i.e. the name of the class implementing it) and add it to this KieSessionModel


getWorkItemHandlerModels

List<WorkItemHandlerModel> getWorkItemHandlerModels()
Returns all the WorkItemHandlerModels defined for this KieSessionModel


setScope

KieSessionModel setScope(String scope)
Sets the CDI scope for this KieSessionModel Default is javax.enterprise.context.ApplicationScoped


getScope

String getScope()
Returns the CDI scope of this KieSessionModel


isDefault

boolean isDefault()
Returns true if this KieSessionModel is the default one


setDefault

KieSessionModel setDefault(boolean isDefault)
Sets the KieSession generated from this KieSessionModel as the default one, i.e. the one that can be loaded from the KieContainer without having to pass its name. Note that only one default KieSessionModel of type STATEFUL and one of type STATELESS are allowed in a given KieContainer so if more than one is found (maybe because a given KieContainer includes many KieModules) a warning is emitted and all the defaults are disabled so all the KieSessions will be accessible only by name


KIE API 6.0.0.CR2

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