|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jactr.core.module.AbstractModule
org.jactr.core.module.declarative.basic.AbstractDeclarativeModule
org.jactr.core.module.declarative.basic.DefaultDeclarativeModule
public class DefaultDeclarativeModule
| Constructor Summary | |
|---|---|
DefaultDeclarativeModule()
|
|
| Method Summary | |
|---|---|
void |
dispose()
release any resources. |
void |
dispose(IChunk chunk)
request that this chunk be disposed. |
java.util.concurrent.Future<java.util.Collection<IChunk>> |
findExactMatches(ChunkTypeRequest request,
java.util.Comparator<IChunk> sorter,
double activationThreshold,
boolean bestOne)
search DM for all the chunks that match pattern, sorting using sorter, that are above activationThreshold |
java.util.concurrent.Future<java.util.Collection<IChunk>> |
findPartialMatches(ChunkTypeRequest request,
java.util.Comparator<IChunk> sorter,
double activationThreshold,
boolean bestOne)
search DM for all the chunks that partially match |
long |
getNumberOfChunks()
return the number of chunks in the model. |
java.lang.String |
getParameter(java.lang.String key)
return parameter value - null if not defined. |
java.util.Collection<java.lang.String> |
getPossibleParameters()
Return all parameters that can be read |
java.util.Collection<java.lang.String> |
getSetableParameters()
Return list of all parameters that can be set. |
void |
initialize()
here we attach a buffer listener to all the buffers and catch the removal notifications to see if we should encode the chunk.. |
static boolean |
isDisposalSuspended(IChunk chunk)
|
void |
reset()
reset the module. |
static void |
setDisposalSuspended(IChunk chunk,
boolean suspend)
there is a grey area between the creation of a chunk and it's use in a buffer or encoding. |
void |
setParameter(java.lang.String key,
java.lang.String value)
Set the named parameter |
boolean |
willEncode(IChunk chunk)
because encoding might be async, we need a method to determine if a given chunk is scheduled for encoding |
| Methods inherited from class org.jactr.core.module.declarative.basic.AbstractDeclarativeModule |
|---|
addChunk, addChunkType, addListener, copyChunk, createChunk, createChunkType, getBusyChunk, getChunk, getChunks, getChunkType, getChunkTypes, getEmptyChunk, getErrorChunk, getFreeChunk, getFullChunk, getNewChunk, getRequestedChunk, getUnrequestedChunk, removeListener |
| Methods inherited from class org.jactr.core.module.AbstractModule |
|---|
delayedFuture, getExecutor, getModel, getName, immediateFuture, immediateReturn, install, uninstall |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jactr.core.module.declarative.IDeclarativeModule |
|---|
addChunk, addChunkType, addListener, copyChunk, createChunk, createChunkType, getBusyChunk, getChunk, getChunks, getChunkType, getChunkTypes, getEmptyChunk, getErrorChunk, getFreeChunk, getFullChunk, getNewChunk, getRequestedChunk, getUnrequestedChunk, removeListener |
| Methods inherited from interface org.jactr.core.module.IModule |
|---|
getModel, getName, install |
| Methods inherited from interface org.jactr.core.utils.IInstallable |
|---|
uninstall |
| Constructor Detail |
|---|
public DefaultDeclarativeModule()
| Method Detail |
|---|
public static void setDisposalSuspended(IChunk chunk,
boolean suspend)
chunk - public static boolean isDisposalSuspended(IChunk chunk)
public boolean willEncode(IChunk chunk)
IDeclarativeModule
willEncode in interface IDeclarativeModulepublic void dispose()
IModule
dispose in interface IModuledispose in class AbstractModulepublic long getNumberOfChunks()
IDeclarativeModule
getNumberOfChunks in interface IDeclarativeModulepublic void initialize()
initialize in interface IModuleinitialize in interface IInitializableinitialize in class AbstractDeclarativeModuleAbstractModule.initialize()
public java.util.concurrent.Future<java.util.Collection<IChunk>> findExactMatches(ChunkTypeRequest request,
java.util.Comparator<IChunk> sorter,
double activationThreshold,
boolean bestOne)
IDeclarativeModule
findExactMatches in interface IDeclarativeModulesorter - may be nullbestOne - find only best one
IDeclarativeModule.findExactMatches(ChunkTypeRequest,
java.util.Comparator, double, boolean)
public java.util.concurrent.Future<java.util.Collection<IChunk>> findPartialMatches(ChunkTypeRequest request,
java.util.Comparator<IChunk> sorter,
double activationThreshold,
boolean bestOne)
IDeclarativeModule
findPartialMatches in interface IDeclarativeModulesorter - may be nullbestOne - true if you only want the best one chunk
IDeclarativeModule.findPartialMatches(ChunkTypeRequest,
java.util.Comparator, double, boolean)public void dispose(IChunk chunk)
IDeclarativeModule
dispose in interface IDeclarativeModulepublic java.lang.String getParameter(java.lang.String key)
IParameterized
getParameter in interface IParameterizedkey - Description of the Parameter
public java.util.Collection<java.lang.String> getPossibleParameters()
IParameterized
getPossibleParameters in interface IParameterizedpublic java.util.Collection<java.lang.String> getSetableParameters()
IParameterized
getSetableParameters in interface IParameterized
public void setParameter(java.lang.String key,
java.lang.String value)
IParameterized
setParameter in interface IParameterizedpublic void reset()
IModule
reset in interface IModule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||