|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.jc.tools.JCShellPlugin
Base class for JCShell plugins. This class allows to extend the shell behavior reflecting specific on-card applets and their functionality in the shell.
Note, classes implementing this interface must have a public default constructor in order to allow the shell to instantiate them dynamically.
JCShell| Field Summary | |
static int |
GUI
Execute mode. |
static int |
HELP
Execute mode. |
static JCInfo |
info
Used to translate values to readable text (default JCInfo.INFO) |
static int |
RUN
Execute mode. |
static int |
USAGE
Execute mode. |
| Constructor Summary | |
JCShellPlugin()
|
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
|
abstract void |
execute(int mode,
java.lang.String cmd,
int cmdNo,
java.lang.String[] argv)
Parse and execute the specified command. |
boolean |
execute(int mode,
java.lang.String cmd,
java.lang.String[] argv,
java.lang.Object argsSpec)
Parse and execute the specified command using GetOpt specification. |
byte[] |
getAID()
|
JCApplet |
getApplet()
|
abstract java.lang.String[] |
getCommands()
Return the list of supported commands. |
java.lang.String |
getNickName()
|
java.lang.String |
getSpecialVariable(java.lang.String name)
Return value of special variable. |
void |
initialize(java.lang.String nickName,
byte[] aid)
Initialize a new instance of this off-card applet representative. |
static java.lang.String[] |
joinLists(java.lang.String[] subCmds,
java.lang.String[] superCmds)
Join two string array. |
void |
setApplet(JCApplet applet)
Associate applet with plugin. |
static void |
throwModeNotSupported(int mode)
Throw an exception to notify shell that requested mode is not supported. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int RUN
public static final int GUI
public static final int USAGE
public static final int HELP
public static JCInfo info
| Constructor Detail |
public JCShellPlugin()
| Method Detail |
public static java.lang.String[] joinLists(java.lang.String[] subCmds,
java.lang.String[] superCmds)
public java.lang.String getNickName()
public JCApplet getApplet()
public byte[] getAID()
public boolean equals(java.lang.Object o)
public void setApplet(JCApplet applet)
applet - associate an applet with the plugin. If null then disconnect
plugin from applet (card pulled out).public java.lang.String getSpecialVariable(java.lang.String name)
name - variable name (without leading plugin nickname)
public void initialize(java.lang.String nickName,
byte[] aid)
nickName - nick name of the appletaid - the aid of the applet
public abstract java.lang.String[] getCommands()
public static void throwModeNotSupported(int mode)
public abstract void execute(int mode,
java.lang.String cmd,
int cmdNo,
java.lang.String[] argv)
mode - what to do with the given command: RUN, GUI, USAGE, HELPcmd - the command name from the command list as returned by this classcmdNo - the index into the command list as returned by getCommands().argv - the parsed argument vector. No present in all mode (see constants)
java.lang.RuntimeException - Command execution may fail with any exception. Shell will catch it
and will print some diagnosis.
public boolean execute(int mode,
java.lang.String cmd,
java.lang.String[] argv,
java.lang.Object argsSpec)
mode - what to do with the given command: RUN, GUI, USAGE, HELPcmd - the command name from the command list as returned by this classargv - the parsed argument vector. No present in all mode (see constants)argsSpec - the GetOpt argument specification. This must be of type
com.ibm.util.getopt.ArgEater or com.ibm.util.getopt.ArgEater[].
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||