public class DefaultNSession extends Object implements Cloneable, net.thevpc.nuts.NSession, net.thevpc.nuts.util.NCopiable
| Modifier and Type | Field and Description |
|---|---|
static InheritableThreadLocal<Stack<net.thevpc.nuts.NSession>> |
CURRENT_SESSION |
protected List<String> |
outputFormatOptions |
protected net.thevpc.nuts.NWorkspace |
workspace |
| Constructor and Description |
|---|
DefaultNSession(net.thevpc.nuts.NWorkspace workspace) |
DefaultNSession(net.thevpc.nuts.NWorkspace workspace,
net.thevpc.nuts.NWorkspaceOptions options) |
| Modifier and Type | Method and Description |
|---|---|
net.thevpc.nuts.NSession |
addListener(net.thevpc.nuts.NListener listener) |
net.thevpc.nuts.NSession |
addOutputFormatOptions(String... options) |
net.thevpc.nuts.NSession |
ask() |
net.thevpc.nuts.NSession |
bot() |
<T> T |
callWith(net.thevpc.nuts.util.NCallable<T> callable) |
void |
close() |
net.thevpc.nuts.NSession |
configure(boolean skipUnsupported,
String... args)
configure the current command with the given arguments.
|
net.thevpc.nuts.NSession |
configure(net.thevpc.nuts.NWorkspaceOptions options) |
boolean |
configureFirst(net.thevpc.nuts.cmdline.NCmdLine cmdLine) |
net.thevpc.nuts.NSession |
copy() |
net.thevpc.nuts.NSession |
copyFrom(net.thevpc.nuts.NBootOptions options) |
net.thevpc.nuts.NSession |
copyFrom(net.thevpc.nuts.NSession other) |
net.thevpc.nuts.NSession |
copyFrom(net.thevpc.nuts.NWorkspaceOptions options) |
net.thevpc.nuts.NSession |
currentUser() |
net.thevpc.nuts.NSession |
embedded() |
net.thevpc.nuts.elem.NArrayElementBuilder |
eout() |
net.thevpc.nuts.io.NPrintStream |
err() |
net.thevpc.nuts.NSession |
flush() |
net.thevpc.nuts.util.NOptional<Boolean> |
getBot() |
net.thevpc.nuts.util.NOptional<Boolean> |
getCached() |
net.thevpc.nuts.util.NOptional<net.thevpc.nuts.NConfirmationMode> |
getConfirm() |
net.thevpc.nuts.util.NOptional<String> |
getDebug() |
String |
getDependencySolver() |
net.thevpc.nuts.util.NOptional<Boolean> |
getDry() |
net.thevpc.nuts.elem.NArrayElementBuilder |
getElemOut() |
String |
getErrLinePrefix() |
net.thevpc.nuts.util.NOptional<net.thevpc.nuts.NExecutionType> |
getExecutionType() |
net.thevpc.nuts.util.NOptional<Instant> |
getExpireTime() |
net.thevpc.nuts.util.NOptional<net.thevpc.nuts.NFetchStrategy> |
getFetchStrategy() |
net.thevpc.nuts.util.NOptional<Boolean> |
getGui() |
net.thevpc.nuts.util.NOptional<Boolean> |
getIndexed() |
net.thevpc.nuts.format.NIterableFormat |
getIterableOutput() |
List<net.thevpc.nuts.NListener> |
getListeners() |
<T extends net.thevpc.nuts.NListener> |
getListeners(Class<T> type) |
net.thevpc.nuts.util.NOptional<String> |
getLocale() |
Filter |
getLogFileFilter() |
Level |
getLogFileLevel() |
Filter |
getLogTermFilter() |
Level |
getLogTermLevel() |
String |
getOutLinePrefix() |
net.thevpc.nuts.util.NOptional<net.thevpc.nuts.format.NContentType> |
getOutputFormat() |
List<String> |
getOutputFormatOptions() |
net.thevpc.nuts.util.NOptional<Boolean> |
getPreviewRepo() |
String |
getProgressOptions() |
NPropertiesHolder |
getPropertiesHolder() |
net.thevpc.nuts.util.NOptional<net.thevpc.nuts.NRunAs> |
getRunAs() |
net.thevpc.nuts.util.NOptional<Boolean> |
getShowStacktrace() |
net.thevpc.nuts.io.NTerminal |
getTerminal() |
net.thevpc.nuts.util.NOptional<Boolean> |
getTrace() |
Boolean |
getTrace(boolean withDefaults) |
net.thevpc.nuts.util.NOptional<Boolean> |
getTransitive() |
net.thevpc.nuts.NWorkspace |
getWorkspace() |
InputStream |
in() |
boolean |
isAsk() |
boolean |
isBot() |
boolean |
isCached() |
boolean |
isDry() |
boolean |
isGui() |
boolean |
isIndexed() |
boolean |
isIterableOut() |
boolean |
isIterableTrace() |
boolean |
isLogFileLevel(Level level) |
boolean |
isLogTermLevel(Level level) |
boolean |
isNo() |
boolean |
isPlainOut() |
boolean |
isPlainTrace() |
boolean |
isPreviewRepo() |
boolean |
isProgress() |
boolean |
isStructuredOut() |
boolean |
isStructuredTrace() |
boolean |
isTrace() |
boolean |
isTransitive() |
boolean |
isVerboseFile() |
boolean |
isVerboseTerm() |
boolean |
isYes() |
net.thevpc.nuts.NSession |
json() |
net.thevpc.nuts.NSession |
no() |
net.thevpc.nuts.io.NPrintStream |
out() |
net.thevpc.nuts.NSession |
plain() |
net.thevpc.nuts.NSession |
props() |
net.thevpc.nuts.NSession |
removeListener(net.thevpc.nuts.NListener listener) |
net.thevpc.nuts.NSession |
root() |
void |
runWith(net.thevpc.nuts.util.NRunnable runnable) |
net.thevpc.nuts.NSession |
setBot(Boolean bot) |
net.thevpc.nuts.NSession |
setCached(Boolean value) |
net.thevpc.nuts.NSession |
setConfirm(net.thevpc.nuts.NConfirmationMode confirm) |
net.thevpc.nuts.NSession |
setDebug(String debug) |
net.thevpc.nuts.NSession |
setDependencySolver(String dependencySolver) |
net.thevpc.nuts.NSession |
setDry(Boolean dry) |
net.thevpc.nuts.NSession |
setElemOut(net.thevpc.nuts.elem.NArrayElementBuilder eout) |
net.thevpc.nuts.NSession |
setErrLinePrefix(String errLinePrefix) |
net.thevpc.nuts.NSession |
setExecutionType(net.thevpc.nuts.NExecutionType executionType) |
net.thevpc.nuts.NSession |
setExpireTime(Instant expireTime) |
net.thevpc.nuts.NSession |
setFetchStrategy(net.thevpc.nuts.NFetchStrategy mode) |
net.thevpc.nuts.NSession |
setGui(Boolean gui) |
net.thevpc.nuts.NSession |
setIndexed(Boolean value) |
net.thevpc.nuts.NSession |
setIterableOut(boolean iterableOut) |
net.thevpc.nuts.NSession |
setLocale(String locale) |
net.thevpc.nuts.NSession |
setLogFileFilter(Filter logFileFilter) |
net.thevpc.nuts.NSession |
setLogFileLevel(Level logFileLevel) |
net.thevpc.nuts.NSession |
setLogFilter(Filter filter) |
net.thevpc.nuts.NSession |
setLogTermLevel(Level level) |
net.thevpc.nuts.NSession |
setOutLinePrefix(String outLinePrefix) |
net.thevpc.nuts.NSession |
setOutputFormat(net.thevpc.nuts.format.NContentType outputFormat) |
net.thevpc.nuts.NSession |
setOutputFormatOptions(List<String> options) |
net.thevpc.nuts.NSession |
setOutputFormatOptions(String... options) |
net.thevpc.nuts.NSession |
setPreviewRepo(Boolean bot) |
net.thevpc.nuts.NSession |
setProgressOptions(String progressOptions) |
net.thevpc.nuts.NSession |
setRunAs(net.thevpc.nuts.NRunAs runAs) |
net.thevpc.nuts.NSession |
setShowStacktrace(Boolean showStacktrace) |
net.thevpc.nuts.NSession |
setTerminal(net.thevpc.nuts.io.NTerminal terminal) |
net.thevpc.nuts.NSession |
setTrace(Boolean trace) |
net.thevpc.nuts.NSession |
setTransitive(Boolean value) |
net.thevpc.nuts.NSession |
spawn() |
net.thevpc.nuts.NSession |
sudo() |
net.thevpc.nuts.NSession |
system() |
net.thevpc.nuts.NSession |
table() |
String |
toString() |
net.thevpc.nuts.NSession |
trace() |
net.thevpc.nuts.NSession |
tree() |
net.thevpc.nuts.NSession |
xml() |
net.thevpc.nuts.NSession |
yes() |
public static final InheritableThreadLocal<Stack<net.thevpc.nuts.NSession>> CURRENT_SESSION
protected net.thevpc.nuts.NWorkspace workspace
public DefaultNSession(net.thevpc.nuts.NWorkspace workspace)
public DefaultNSession(net.thevpc.nuts.NWorkspace workspace,
net.thevpc.nuts.NWorkspaceOptions options)
public void runWith(net.thevpc.nuts.util.NRunnable runnable)
runWith in interface net.thevpc.nuts.NSessionpublic <T> T callWith(net.thevpc.nuts.util.NCallable<T> callable)
callWith in interface net.thevpc.nuts.NSessionpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface net.thevpc.nuts.NSessionpublic final net.thevpc.nuts.NSession configure(boolean skipUnsupported,
String... args)
NCmdLineConfigurable.configure(boolean, java.lang.String...)
to help return a more specific return type;configure in interface net.thevpc.nuts.cmdline.NCmdLineConfigurableargs - argument to configure withthis instancepublic boolean configureFirst(net.thevpc.nuts.cmdline.NCmdLine cmdLine)
configureFirst in interface net.thevpc.nuts.cmdline.NCmdLineConfigurablepublic net.thevpc.nuts.util.NOptional<Boolean> getTrace()
getTrace in interface net.thevpc.nuts.NSessionpublic Boolean getTrace(boolean withDefaults)
getTrace in interface net.thevpc.nuts.NSessionpublic boolean isTrace()
isTrace in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession trace()
trace in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setTrace(Boolean trace)
setTrace in interface net.thevpc.nuts.NSessionpublic boolean isPlainTrace()
isPlainTrace in interface net.thevpc.nuts.NSessionpublic boolean isIterableTrace()
isIterableTrace in interface net.thevpc.nuts.NSessionpublic boolean isStructuredTrace()
isStructuredTrace in interface net.thevpc.nuts.NSessionpublic boolean isIterableOut()
isIterableOut in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setIterableOut(boolean iterableOut)
setIterableOut in interface net.thevpc.nuts.NSessionpublic boolean isStructuredOut()
isStructuredOut in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.elem.NArrayElementBuilder getElemOut()
getElemOut in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setElemOut(net.thevpc.nuts.elem.NArrayElementBuilder eout)
setElemOut in interface net.thevpc.nuts.NSessionpublic boolean isPlainOut()
isPlainOut in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<Boolean> getBot()
getBot in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<Boolean> getPreviewRepo()
getPreviewRepo in interface net.thevpc.nuts.NSessionpublic boolean isPreviewRepo()
isPreviewRepo in interface net.thevpc.nuts.NSessionpublic boolean isBot()
isBot in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setBot(Boolean bot)
setBot in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setPreviewRepo(Boolean bot)
setPreviewRepo in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession bot()
bot in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession yes()
yes in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession no()
no in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession ask()
ask in interface net.thevpc.nuts.NSessionpublic boolean isYes()
isYes in interface net.thevpc.nuts.NSessionpublic boolean isNo()
isNo in interface net.thevpc.nuts.NSessionpublic boolean isAsk()
isAsk in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<net.thevpc.nuts.format.NContentType> getOutputFormat()
getOutputFormat in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setOutputFormat(net.thevpc.nuts.format.NContentType outputFormat)
setOutputFormat in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession json()
json in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession plain()
plain in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession props()
props in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession tree()
tree in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession table()
table in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession xml()
xml in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession copy()
copy in interface net.thevpc.nuts.NSessioncopy in interface net.thevpc.nuts.util.NCopiablepublic net.thevpc.nuts.NSession copyFrom(net.thevpc.nuts.NSession other)
copyFrom in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession copyFrom(net.thevpc.nuts.NWorkspaceOptions options)
copyFrom in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession copyFrom(net.thevpc.nuts.NBootOptions options)
public net.thevpc.nuts.util.NOptional<net.thevpc.nuts.NFetchStrategy> getFetchStrategy()
getFetchStrategy in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setFetchStrategy(net.thevpc.nuts.NFetchStrategy mode)
setFetchStrategy in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession addListener(net.thevpc.nuts.NListener listener)
addListener in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession removeListener(net.thevpc.nuts.NListener listener)
removeListener in interface net.thevpc.nuts.NSessionpublic <T extends net.thevpc.nuts.NListener> List<T> getListeners(Class<T> type)
getListeners in interface net.thevpc.nuts.NSessionpublic List<net.thevpc.nuts.NListener> getListeners()
getListeners in interface net.thevpc.nuts.NSessionpublic NPropertiesHolder getPropertiesHolder()
public net.thevpc.nuts.util.NOptional<net.thevpc.nuts.NConfirmationMode> getConfirm()
getConfirm in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setConfirm(net.thevpc.nuts.NConfirmationMode confirm)
setConfirm in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession addOutputFormatOptions(String... options)
addOutputFormatOptions in interface net.thevpc.nuts.NSessionpublic List<String> getOutputFormatOptions()
getOutputFormatOptions in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setOutputFormatOptions(String... options)
setOutputFormatOptions in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setOutputFormatOptions(List<String> options)
setOutputFormatOptions in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.io.NPrintStream out()
out in interface net.thevpc.nuts.NSessionpublic InputStream in()
in in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.io.NPrintStream err()
err in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.format.NIterableFormat getIterableOutput()
getIterableOutput in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.io.NTerminal getTerminal()
getTerminal in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setTerminal(net.thevpc.nuts.io.NTerminal terminal)
setTerminal in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NWorkspace getWorkspace()
getWorkspace in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<Boolean> getTransitive()
getTransitive in interface net.thevpc.nuts.NSessionpublic boolean isTransitive()
isTransitive in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setTransitive(Boolean value)
setTransitive in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<Boolean> getCached()
getCached in interface net.thevpc.nuts.NSessionpublic boolean isCached()
isCached in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setCached(Boolean value)
setCached in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<Boolean> getIndexed()
getIndexed in interface net.thevpc.nuts.NSessionpublic boolean isIndexed()
isIndexed in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setIndexed(Boolean value)
setIndexed in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<Instant> getExpireTime()
getExpireTime in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setExpireTime(Instant expireTime)
setExpireTime in interface net.thevpc.nuts.NSessionpublic String getProgressOptions()
getProgressOptions in interface net.thevpc.nuts.NSessionpublic boolean isProgress()
isProgress in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setProgressOptions(String progressOptions)
setProgressOptions in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<Boolean> getGui()
getGui in interface net.thevpc.nuts.NSessionpublic boolean isGui()
isGui in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setGui(Boolean gui)
setGui in interface net.thevpc.nuts.NSessionpublic String getErrLinePrefix()
getErrLinePrefix in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setErrLinePrefix(String errLinePrefix)
setErrLinePrefix in interface net.thevpc.nuts.NSessionpublic String getOutLinePrefix()
getOutLinePrefix in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setOutLinePrefix(String outLinePrefix)
setOutLinePrefix in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<Boolean> getDry()
getDry in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<Boolean> getShowStacktrace()
getShowStacktrace in interface net.thevpc.nuts.NSessionpublic boolean isDry()
isDry in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setDry(Boolean dry)
setDry in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setShowStacktrace(Boolean showStacktrace)
setShowStacktrace in interface net.thevpc.nuts.NSessionpublic Level getLogTermLevel()
getLogTermLevel in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setLogTermLevel(Level level)
setLogTermLevel in interface net.thevpc.nuts.NSessionpublic Filter getLogTermFilter()
getLogTermFilter in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setLogFilter(Filter filter)
setLogFilter in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession configure(net.thevpc.nuts.NWorkspaceOptions options)
configure in interface net.thevpc.nuts.NSessionpublic Level getLogFileLevel()
getLogFileLevel in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setLogFileLevel(Level logFileLevel)
setLogFileLevel in interface net.thevpc.nuts.NSessionpublic Filter getLogFileFilter()
getLogFileFilter in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setLogFileFilter(Filter logFileFilter)
setLogFileFilter in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.elem.NArrayElementBuilder eout()
eout in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession flush()
flush in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<net.thevpc.nuts.NExecutionType> getExecutionType()
getExecutionType in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession embedded()
embedded in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession system()
system in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession spawn()
spawn in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setExecutionType(net.thevpc.nuts.NExecutionType executionType)
setExecutionType in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<String> getDebug()
getDebug in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setDebug(String debug)
setDebug in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<String> getLocale()
getLocale in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setLocale(String locale)
setLocale in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.util.NOptional<net.thevpc.nuts.NRunAs> getRunAs()
getRunAs in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setRunAs(net.thevpc.nuts.NRunAs runAs)
setRunAs in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession sudo()
sudo in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession root()
root in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession currentUser()
currentUser in interface net.thevpc.nuts.NSessionpublic String getDependencySolver()
getDependencySolver in interface net.thevpc.nuts.NSessionpublic net.thevpc.nuts.NSession setDependencySolver(String dependencySolver)
setDependencySolver in interface net.thevpc.nuts.NSessionpublic boolean isLogTermLevel(Level level)
isLogTermLevel in interface net.thevpc.nuts.NSessionpublic boolean isVerboseTerm()
isVerboseTerm in interface net.thevpc.nuts.NSessionpublic boolean isLogFileLevel(Level level)
isLogFileLevel in interface net.thevpc.nuts.NSessionpublic boolean isVerboseFile()
isVerboseFile in interface net.thevpc.nuts.NSessionCopyright © 2025 vpc open source initiative. All rights reserved.