Package net.thevpc.naru.impl.engine
Class NaruSessionImpl
java.lang.Object
net.thevpc.naru.impl.engine.NaruSessionImpl
- All Implemented Interfaces:
NaruSession,net.thevpc.nuts.elem.NToElement
-
Constructor Summary
ConstructorsConstructorDescriptionNaruSessionImpl(NaruAgent agent, net.thevpc.nuts.io.NPath projectDir, NaruMeteringService meteringService, boolean configureDefaults, NaruSessionListener sessionListener) -
Method Summary
Modifier and TypeMethodDescriptionvoid_reportUsing(net.thevpc.nuts.io.NPath source) voidaddModelAlias(String alias, NaruModelConfig model) voidaddSessionListener(NaruSessionListener listener) agent()copy()voiddeliverInput(String line) eventLog()net.thevpc.nuts.util.NOptional<NaruModelConfig>net.thevpc.nuts.util.NOptional<NaruModelConfig>findModel(NaruModelConfig keyOrName) net.thevpc.nuts.util.NOptional<NaruModelConfig>findModelAlias(String alias) net.thevpc.nuts.util.NOptional<NaruTask>findTask(long tid) long[]findTaskIdsByParent(long taskId) voidvoidfireChangedTask(long id) longforegroundTaskId(long taskId) net.thevpc.nuts.util.NOptional<net.thevpc.nuts.elem.NElement>getProjectEnv(String key) intlongnet.thevpc.nuts.util.NOptional<Object>getSessionEnv(String key) booleanbooleanList<net.thevpc.nuts.io.NPath>listOverridablePaths(net.thevpc.nuts.io.NPath publicPath, net.thevpc.nuts.io.NPath privatePath, Predicate<String> nameFilter) voidlog(NaruLogMode mode, net.thevpc.nuts.text.NMsg s) name()newTask(NaruTaskSpec taskBuilder) voidonInputRequested(NaruTask task) voidonTerminated(long tid) net.thevpc.nuts.io.NPathregistry()reload()voidremoveModelAlias(String alias) voidremoveSessionListener(NaruSessionListener listener) reset(boolean preserveIdentity) net.thevpc.nuts.util.NOptional<NaruRoutine>routines()save()voidsetProjectEnv(String key, net.thevpc.nuts.elem.NElement value, NAruVisibility visibility) setSchedulerThreadCount(int schedulerThreadCount) setSchedulerThrottleDelayMs(long schedulerThrottleDelayMs) setSessionEnv(String key, Object value) setVisibility(NAruVisibility visibility) setWorkingDir(net.thevpc.nuts.io.NPath workingDir) voidstart()voidstop()systemPrompt(String systemPrompt) tasks()throttleDelay(long ms) net.thevpc.nuts.elem.NElementunsetSessionEnv(String key) uuid()voidwaitFor()net.thevpc.nuts.io.NPath
-
Constructor Details
-
NaruSessionImpl
public NaruSessionImpl(NaruAgent agent, net.thevpc.nuts.io.NPath projectDir, NaruMeteringService meteringService, boolean configureDefaults, NaruSessionListener sessionListener)
-
-
Method Details
-
throttleDelay
- Specified by:
throttleDelayin interfaceNaruSession
-
getSchedulerThreadCount
public int getSchedulerThreadCount() -
setSchedulerThreadCount
-
getSchedulerThrottleDelayMs
public long getSchedulerThrottleDelayMs() -
setSchedulerThrottleDelayMs
-
scheduler
- Specified by:
schedulerin interfaceNaruSession
-
getVisibility
- Specified by:
getVisibilityin interfaceNaruSession
-
setVisibility
- Specified by:
setVisibilityin interfaceNaruSession
-
unsetSessionEnv
- Specified by:
unsetSessionEnvin interfaceNaruSession
-
tasks
- Specified by:
tasksin interfaceNaruSession
-
newTask
- Specified by:
newTaskin interfaceNaruSession
-
findTask
- Specified by:
findTaskin interfaceNaruSession
-
setSessionEnv
- Specified by:
setSessionEnvin interfaceNaruSession
-
getSessionEnv
- Specified by:
getSessionEnvin interfaceNaruSession
-
getProjectEnv
- Specified by:
getProjectEnvin interfaceNaruSession
-
setProjectEnv
public void setProjectEnv(String key, net.thevpc.nuts.elem.NElement value, NAruVisibility visibility) - Specified by:
setProjectEnvin interfaceNaruSession
-
name
- Specified by:
namein interfaceNaruSession
-
setName
- Specified by:
setNamein interfaceNaruSession
-
modelAliases
- Specified by:
modelAliasesin interfaceNaruSession
-
reversedModelAliases
- Specified by:
reversedModelAliasesin interfaceNaruSession
-
findModel
-
findModel
- Specified by:
findModelin interfaceNaruSession
-
removeModelAlias
- Specified by:
removeModelAliasin interfaceNaruSession
-
addModelAlias
- Specified by:
addModelAliasin interfaceNaruSession
-
findModelAlias
- Specified by:
findModelAliasin interfaceNaruSession
-
creationInstant
- Specified by:
creationInstantin interfaceNaruSession
-
modificationInstant
- Specified by:
modificationInstantin interfaceNaruSession
-
uuid
- Specified by:
uuidin interfaceNaruSession
-
fireChanged
public void fireChanged() -
copy
- Specified by:
copyin interfaceNaruSession
-
reset
- Specified by:
resetin interfaceNaruSession
-
saveSnapshot
- Specified by:
saveSnapshotin interfaceNaruSession
-
save
- Specified by:
savein interfaceNaruSession
-
load
- Specified by:
loadin interfaceNaruSession
-
reload
- Specified by:
reloadin interfaceNaruSession
-
restoreSnapshot
- Specified by:
restoreSnapshotin interfaceNaruSession
-
toElement
public net.thevpc.nuts.elem.NElement toElement()- Specified by:
toElementin interfaceNaruSession- Specified by:
toElementin interfacenet.thevpc.nuts.elem.NToElement
-
deliverInput
-
onInputRequested
-
log
- Specified by:
login interfaceNaruSession
-
_reportUsing
public void _reportUsing(net.thevpc.nuts.io.NPath source) -
listOverridablePaths
-
workingDir
public net.thevpc.nuts.io.NPath workingDir()- Specified by:
workingDirin interfaceNaruSession
-
setWorkingDir
- Specified by:
setWorkingDirin interfaceNaruSession
-
projectDir
public net.thevpc.nuts.io.NPath projectDir()- Specified by:
projectDirin interfaceNaruSession
-
skillManager
- Specified by:
skillManagerin interfaceNaruSession
-
terminate
- Specified by:
terminatein interfaceNaruSession
-
hasMoreStatements
public boolean hasMoreStatements()- Specified by:
hasMoreStatementsin interfaceNaruSession
-
agent
- Specified by:
agentin interfaceNaruSession
-
sessionManager
- Specified by:
sessionManagerin interfaceNaruSession
-
registry
- Specified by:
registryin interfaceNaruSession
-
meteringService
- Specified by:
meteringServicein interfaceNaruSession
-
foregroundTaskId
public long foregroundTaskId()- Specified by:
foregroundTaskIdin interfaceNaruSession
-
foregroundTaskId
- Specified by:
foregroundTaskIdin interfaceNaruSession
-
start
public void start()- Specified by:
startin interfaceNaruSession
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceNaruSession
-
stop
public void stop()- Specified by:
stopin interfaceNaruSession
-
addSessionListener
- Specified by:
addSessionListenerin interfaceNaruSession
-
removeSessionListener
- Specified by:
removeSessionListenerin interfaceNaruSession
-
waitFor
public void waitFor()- Specified by:
waitForin interfaceNaruSession
-
systemPrompt
- Specified by:
systemPromptin interfaceNaruSession
-
systemPrompt
- Specified by:
systemPromptin interfaceNaruSession
-
onTerminated
public void onTerminated(long tid) -
eventLog
- Specified by:
eventLogin interfaceNaruSession
-
findTaskIdsByParent
public long[] findTaskIdsByParent(long taskId) - Specified by:
findTaskIdsByParentin interfaceNaruSession
-
routines
- Specified by:
routinesin interfaceNaruSession
-
getSessionEnv
- Specified by:
getSessionEnvin interfaceNaruSession
-
routine
public net.thevpc.nuts.util.NOptional<NaruRoutine> routine(String nameOrPath, NaruTask task, boolean orCreate) - Specified by:
routinein interfaceNaruSession
-
fireChangedTask
public void fireChangedTask(long id)
-