org.zilonis.tool.ui.shell
Interface Plugin


public interface Plugin

The shell will call on an interpretor with this interface.


Method Summary
 void console(java.io.DataInputStream stdin, java.io.PrintStream stdout, java.io.PrintStream stderr)
          The interpreter handles I/O on this interface as if on the command line, until this method throws an exception.
 boolean exception(java.lang.Exception exc, java.io.PrintStream stdout, java.io.PrintStream stderr)
          Called with an exception from the "console" method.
 java.lang.String userVersion()
          String displayed in the UI, under the console, with the interpreter's name and version.
 

Method Detail

userVersion

java.lang.String userVersion()
String displayed in the UI, under the console, with the interpreter's name and version.


console

void console(java.io.DataInputStream stdin,
             java.io.PrintStream stdout,
             java.io.PrintStream stderr)
             throws java.io.IOException
The interpreter handles I/O on this interface as if on the command line, until this method throws an exception.

Parameters:
stdin - GUI console input.
stdout - GUI console output.
stderr - GUI console output.
Throws:
java.io.IOException

exception

boolean exception(java.lang.Exception exc,
                  java.io.PrintStream stdout,
                  java.io.PrintStream stderr)
Called with an exception from the "console" method. If the "console" method returns, interpretation continues. However, if it throws an exception, this method is called with that exception to verify that the shell interpretation thread should exit.

Parameters:
exc - Exception thrown by the console.
stdout - GUI console output.
stderr - GUI console output.
Returns:
Whether to continue the shell intepretation thread or return.