public class SimpleShellContext extends Object implements ShellContext
ShellContext. This implementation does not
implement any of the event handling. The purpose of this class is to provide
a very simple implementation of the shell context in case users wish to execute
shell commands from outside the interactive shell runtime environment. In other
words, it's useful when utilizing the shell command as a standalone Java app.| Constructor and Description |
|---|
SimpleShellContext()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(ShellContextEventHandler handler)
Adds an event handler to the shell context.
|
Object |
getVariable(QName name)
Gets a variable from the context.
|
void |
removeHandler(ShellContextEventHandler handler)
Removes an event handler from the shell context.
|
Object |
removeVariable(QName name)
Removes a variable from the context.
|
void |
setVariable(QName name,
Object object)
Sets a variable in the context.
|
void |
setVariable(QName name,
Object object,
ShellContextVariableLifecycleHandler lifecycleHandler)
Sets a variable in the context.
|
public void setVariable(QName name, Object object)
ShellContextsetVariable in interface ShellContextorg.overlord.sramp.shell.api.shell.ShellContext#setVariable(javax.xml.namespace.QName, java.lang.Object)public void setVariable(QName name, Object object, ShellContextVariableLifecycleHandler lifecycleHandler)
ShellContextsetVariable in interface ShellContextorg.overlord.sramp.shell.api.shell.ShellContext#setVariable(javax.xml.namespace.QName, java.lang.Object, org.overlord.sramp.shell.api.shell.ShellContextVariableLifecycleHandler)public Object getVariable(QName name)
ShellContextgetVariable in interface ShellContextorg.overlord.sramp.shell.api.shell.ShellContext#getVariable(javax.xml.namespace.QName)public Object removeVariable(QName name)
ShellContextremoveVariable in interface ShellContextorg.overlord.sramp.shell.api.shell.ShellContext#removeVariable(javax.xml.namespace.QName)public void addHandler(ShellContextEventHandler handler)
ShellContextaddHandler in interface ShellContextShellContext.addHandler(org.overlord.sramp.shell.api.ShellContextEventHandler)public void removeHandler(ShellContextEventHandler handler)
ShellContextremoveHandler in interface ShellContextShellContext.removeHandler(org.overlord.sramp.shell.api.ShellContextEventHandler)Copyright © 2011-2013 JBoss, a division of Red Hat. All Rights Reserved.