|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ksu.cis.projects.bogor.module.event.AbstractEventProvider
edu.ksu.cis.projects.bogor.module.state.event.AbstractStateEventProvider
edu.ksu.cis.projects.bogor.module.state.DefaultStateFactory
public class DefaultStateFactory
The default implementation of IStateFactory.
| Field Summary | |
|---|---|
protected IBogorConfiguration |
bc
Holds the Bogor configuration for this state factory. |
protected int |
nextThreadDesc
Holds the next thread descriptor. |
protected SymbolTable |
st
|
protected String[] |
stateAugmenterClassNames
Java class names of the state space contributors. |
protected IStateAugmenter[] |
stateAugmenters
State space contributors. |
protected IValueFactory |
valueFactory
Holds the value factory for this state factory. |
| Fields inherited from class edu.ksu.cis.projects.bogor.module.state.event.AbstractStateEventProvider |
|---|
dsenBackward, dsenForward |
| Fields inherited from class edu.ksu.cis.projects.bogor.module.event.AbstractEventProvider |
|---|
isForward, s, threadId |
| Fields inherited from interface edu.ksu.cis.projects.bogor.module.IStateFactory |
|---|
EPSILON_THREAD, STATE_AUGMENTER_ID |
| Constructor Summary | |
|---|---|
DefaultStateFactory()
|
|
| Method Summary | |
|---|---|
void |
augmentState(IState state,
BitBuffer bb)
Write extra components of state space into bitwise representation. |
IMessageStore |
connect(IBogorConfiguration bc)
Connects this modules to other modules. |
IState |
createState(IStateFactoryArguments sfa)
Creates an initial state. |
void |
dispose()
Remove references. |
String |
getCopyrightNotice()
Returns the copyright notice for this module. |
Pair<Domain,Boolean> |
getOptionDomain(String id)
|
Collection<Triple<String,Boolean,OptionScope>> |
getOptionIds()
|
IStateAugmenter[] |
getStateAugmenters()
Get the set of state augmenters that contribute to the state space. |
Collection<String> |
getSuggestedValues(String id,
IBogorConfiguration bc,
SymbolTable st)
|
int |
getThreadDescriptorSeed()
Gets the thread descriptor seed. |
int |
newThreadDescriptor()
Creates a fresh thread descriptor. |
IMessageStore |
setOptions(String key,
Properties configuration)
Sets the options for this module. |
void |
setThreadDescriptorSeed(int newSeed)
Sets the thread descriptor seed. |
void |
validate(IState state)
Validates a state. |
boolean |
validate(String id,
String value,
IBogorConfiguration bc,
SymbolTable st,
Collection<FileMessage> errors)
Checks whether the value of a configuration option is legal. |
| Methods inherited from class edu.ksu.cis.projects.bogor.module.state.event.AbstractStateEventProvider |
|---|
getNotifier, getNotifier |
| Methods inherited from class edu.ksu.cis.projects.bogor.module.event.AbstractEventProvider |
|---|
backward, forward, getState, getThreadId, isBackward, isForward, removeContext, setContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.ksu.cis.projects.bogor.module.state.event.IStateEventProvider |
|---|
getNotifier, getNotifier |
| Methods inherited from interface edu.ksu.cis.projects.bogor.module.event.IEventProvider |
|---|
backward, forward, getState, getThreadId, isBackward, isForward, removeContext, setContext |
| Field Detail |
|---|
protected SymbolTable st
protected IValueFactory valueFactory
protected IBogorConfiguration bc
protected int nextThreadDesc
protected String[] stateAugmenterClassNames
protected IStateAugmenter[] stateAugmenters
| Constructor Detail |
|---|
public DefaultStateFactory()
| Method Detail |
|---|
public String getCopyrightNotice()
IModule
getCopyrightNotice in interface IModule
public IMessageStore setOptions(String key,
Properties configuration)
IModule
setOptions in interface IModulekey - The key (prefix) for this module options. Must be non-null.
The key is used for module specific options.configuration - The options for all modules. Must be non-null.public void setThreadDescriptorSeed(int newSeed)
IStateFactory
setThreadDescriptorSeed in interface IStateFactorynewSeed - The new thread descriptor.public int getThreadDescriptorSeed()
IStateFactory
getThreadDescriptorSeed in interface IStateFactorypublic IMessageStore connect(IBogorConfiguration bc)
IModule
connect in interface IModulebc - The Bogor configuration containing modules to connect to.
Must be non-null.public IState createState(IStateFactoryArguments sfa)
IStateFactory
createState in interface IStateFactorypublic void dispose()
Disposable
dispose in interface Disposablepublic int newThreadDescriptor()
IStateFactory
newThreadDescriptor in interface IStateFactorypublic void validate(IState state)
IStateFactory
validate in interface IStateFactorystate - The state to be validated.
Must be non-null.public IStateAugmenter[] getStateAugmenters()
IStateFactory
getStateAugmenters in interface IStateFactory
public void augmentState(IState state,
BitBuffer bb)
IStateFactory
augmentState in interface IStateFactorypublic Collection<Triple<String,Boolean,OptionScope>> getOptionIds()
getOptionIds in interface ISelfDescribingModuleedu.ksu.cis.projects.bogor.module.ISearcher)
or global in scope (and thus no qualifier is prepended).public Pair<Domain,Boolean> getOptionDomain(String id)
getOptionDomain in interface ISelfDescribingModule
public Collection<String> getSuggestedValues(String id,
IBogorConfiguration bc,
SymbolTable st)
getSuggestedValues in interface ISelfDescribingModule
public boolean validate(String id,
String value,
IBogorConfiguration bc,
SymbolTable st,
Collection<FileMessage> errors)
validate in interface ISelfDescribingModuleid - the option's name, as returned by the first tuple element of
an item returned by getOptionIds()value - the value of the option, or null if unconfiguedst - the symbol table for the BIR modelerrors - a container into which errors should be put. Implementors
should not assume that errors is empty upon
entry into this method; it may aggregate the results of
calling validate on many
ISelfDescribingModule instances.
true iff the option is supported and its value is legal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||