public class CRaSHSession extends HashMap<String,Object> implements Shell, Closeable, RuntimeContext, ReplSession
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
(package private) static Logger |
accessLog
.
|
CRaSH |
crash
.
|
(package private) static Logger |
log
.
|
private Repl |
repl
.
|
(package private) Principal |
user
.
|
| Constructor and Description |
|---|
CRaSHSession(CRaSH crash,
Principal user) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
CompletionMatch |
complete(String prefix)
For now basic implementation
|
ShellProcess |
createProcess(String request)
Process a request.
|
Map<String,Object> |
getAttributes()
Returns the current attributes.
|
ShellCommand<?> |
getCommand(String name) |
Iterable<String> |
getCommandNames() |
PluginContext |
getContext() |
String |
getPrompt()
Returns the shell prompt.
|
Repl |
getRepl()
Returns the current repl of this session.
|
Map<String,Object> |
getSession()
Returns the current session.
|
String |
getWelcome()
Returns the welcome message.
|
(package private) ClassLoader |
setCRaSHLoader() |
(package private) void |
setPreviousLoader(ClassLoader previous) |
void |
setRepl(Repl repl)
Set the current repl of this session.
|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, valuesequals, hashCode, toStringCRaSHSession(CRaSH crash, Principal user)
public void setRepl(Repl repl) throws NullPointerException
repl - the new replNullPointerException - if the repl is nullpublic Iterable<String> getCommandNames()
getCommandNames in interface ReplSessionpublic ShellCommand<?> getCommand(String name) throws CommandCreationException
getCommand in interface ReplSessionCommandCreationExceptionpublic PluginContext getContext()
getContext in interface ReplSessionpublic Map<String,Object> getSession()
RuntimeContextgetSession in interface RuntimeContextpublic Map<String,Object> getAttributes()
RuntimeContextgetAttributes in interface RuntimeContextpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic String getWelcome()
ShellgetWelcome in interface Shellpublic String getPrompt()
Shellpublic ShellProcess createProcess(String request)
ShellcreateProcess in interface Shellrequest - the request to processpublic CompletionMatch complete(String prefix)
ClassLoader setCRaSHLoader()
void setPreviousLoader(ClassLoader previous)
Copyright © 2014 eXo Platform SAS. All Rights Reserved.