|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.impl.shell.ShellApp
This class is the base class any JXTA Shell application must extend.
Field Summary | |
protected net.jxta.document.Advertisement |
adv
The advertisement for this application if any. |
static int |
appMiscError
Something bad happened. |
static int |
appNoError
The command completed successfully. |
static int |
appParamError
An error occurred resulting from incorrect or missing parameters. |
static int |
appSpawned
The command is still running. |
protected net.jxta.pipe.InputPipe |
consin
The console input. |
protected net.jxta.pipe.OutputPipe |
consout
The console output. |
protected java.lang.String |
currentcmdline
We might need the actual command line for custom parsing in one of the command classes located in the impl.shell.bin.* packages. |
java.lang.Thread |
dependsOn
If this thread is enabled, then this is the root thread of another command which this command ca |
protected net.jxta.peergroup.PeerGroup |
group
The default peergroup associated with this app. |
protected net.jxta.pipe.InputPipe |
inputPipe
The "stdin" input pipe for this command. |
protected net.jxta.pipe.OutputPipe |
outputPipe
The "stdout" output pipe for this command. |
protected net.jxta.pipe.Pipe |
pipes
The pipe service for our default peer group. |
protected java.lang.String |
returnVar
if the result is a shell object then store it using this name. |
protected boolean |
started
Has this app begun running? |
protected boolean |
stopped
Has this app in the process of quitting? |
Constructor Summary | |
ShellApp()
|
Method Summary | |
protected java.lang.String |
consPollInput()
|
protected void |
consprint(java.lang.String line)
|
protected void |
consprintln(java.lang.String line)
|
protected java.lang.String |
consWaitForInput()
|
net.jxta.document.Advertisement |
getAdvertisement()
|
ShellEnv |
getEnv()
|
net.jxta.peergroup.PeerGroup |
getGroup()
|
net.jxta.pipe.InputPipe |
getInputConsPipe()
|
net.jxta.pipe.InputPipe |
getInputPipe()
|
net.jxta.pipe.OutputPipe |
getOutputConsPipe()
|
net.jxta.pipe.OutputPipe |
getOutputPipe()
|
java.lang.String |
getReturnVariable()
|
void |
help()
|
void |
init(net.jxta.peergroup.PeerGroup pg,
net.jxta.document.Advertisement adv)
|
boolean |
isRootShell()
|
protected java.lang.String |
pollInput()
|
protected void |
print(java.lang.String line)
|
protected void |
println(java.lang.String line)
|
net.jxta.document.Advertisement |
setAdvertisement(net.jxta.document.Advertisement adv)
|
ShellEnv |
setEnv(ShellEnv e)
|
net.jxta.peergroup.PeerGroup |
setGroup(net.jxta.peergroup.PeerGroup g)
|
net.jxta.pipe.InputPipe |
setInputConsPipe(net.jxta.pipe.InputPipe ip)
|
net.jxta.pipe.InputPipe |
setInputPipe(net.jxta.pipe.InputPipe ip)
Set the input pipe to the provided pipe. |
net.jxta.pipe.OutputPipe |
setOutputConsPipe(net.jxta.pipe.OutputPipe op)
|
net.jxta.pipe.OutputPipe |
setOutputPipe(net.jxta.pipe.OutputPipe op)
|
void |
setReturnVariable(java.lang.String v)
|
int |
startApp(java.lang.String[] args)
|
void |
stopApp()
|
protected java.lang.String |
waitForInput()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int appSpawned
public static final int appNoError
public static final int appParamError
public static final int appMiscError
protected net.jxta.peergroup.PeerGroup group
protected net.jxta.pipe.Pipe pipes
protected net.jxta.document.Advertisement adv
protected net.jxta.pipe.InputPipe inputPipe
protected net.jxta.pipe.OutputPipe outputPipe
protected net.jxta.pipe.InputPipe consin
protected net.jxta.pipe.OutputPipe consout
protected java.lang.String returnVar
protected volatile boolean started
protected volatile boolean stopped
protected java.lang.String currentcmdline
public java.lang.Thread dependsOn
Constructor Detail |
public ShellApp()
Method Detail |
public void init(net.jxta.peergroup.PeerGroup pg, net.jxta.document.Advertisement adv)
public int startApp(java.lang.String[] args)
public void stopApp()
public boolean isRootShell()
public final ShellEnv getEnv()
public final ShellEnv setEnv(ShellEnv e)
public final net.jxta.peergroup.PeerGroup getGroup()
public final net.jxta.peergroup.PeerGroup setGroup(net.jxta.peergroup.PeerGroup g)
public net.jxta.document.Advertisement getAdvertisement()
public net.jxta.document.Advertisement setAdvertisement(net.jxta.document.Advertisement adv)
public final net.jxta.pipe.InputPipe getInputPipe()
public final net.jxta.pipe.InputPipe setInputPipe(net.jxta.pipe.InputPipe ip)
public final net.jxta.pipe.OutputPipe getOutputPipe()
public final net.jxta.pipe.OutputPipe setOutputPipe(net.jxta.pipe.OutputPipe op)
public final net.jxta.pipe.InputPipe getInputConsPipe()
public final net.jxta.pipe.InputPipe setInputConsPipe(net.jxta.pipe.InputPipe ip)
public final net.jxta.pipe.OutputPipe getOutputConsPipe()
public final net.jxta.pipe.OutputPipe setOutputConsPipe(net.jxta.pipe.OutputPipe op)
public void setReturnVariable(java.lang.String v)
public java.lang.String getReturnVariable()
protected final void println(java.lang.String line)
protected final void print(java.lang.String line)
protected final java.lang.String pollInput() throws java.io.IOException
protected final java.lang.String waitForInput() throws java.io.IOException
protected final void consprint(java.lang.String line)
protected final void consprintln(java.lang.String line)
protected final java.lang.String consPollInput() throws java.io.IOException
protected final java.lang.String consWaitForInput() throws java.io.IOException
public void help()
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |