|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.jc.tools.JCRMIClient
| Field Summary | |
static java.lang.String |
CMD_AUTH
|
static java.lang.String |
CMD_CARD
|
static java.lang.String |
CMD_CLOSE
|
static java.lang.String |
CMD_ECHO
|
static java.lang.String |
CMD_INFO
|
static java.lang.String |
CMD_INVOKE
|
static java.lang.String |
CMD_METH
|
static java.lang.String |
CMD_SEL
|
static java.lang.String |
CMD_TERM
|
static java.lang.String |
METH_NAME_SAMPLE
|
static java.lang.String |
MTH_SAMPLE
|
static java.lang.String |
SPACE
|
static java.lang.String |
TERM_REMOTE
|
static java.lang.String |
VAR_METH_PREF
|
| Constructor Summary | |
JCRMIClient()
Constructor JCRMIClient without parameters. |
|
JCRMIClient(java.io.PrintStream out,
java.lang.String term)
Constructor JCRMIClient with parameters: output device and terminal. |
|
JCRMIClient(java.lang.String term)
Constructor JCRMIClient with parameters: terminal. |
|
| Method Summary | |
boolean |
close()
close the terminal connection without response display |
java.lang.String |
executeMethod(java.lang.String methodName,
java.lang.String params)
Execute the given method with the given params and return the execution result. |
java.lang.String |
getFirstSelectableApplet(java.lang.String lastResponse)
Return the name of the first applet in the applet list of the card. |
java.util.HashMap |
getRmiMethods()
|
void |
initShell(java.lang.String[] args)
initialize the JCShell arguments for initialization are possible in convinience with the JCShell |
boolean |
isWithEcho()
|
boolean |
isWithResponse()
|
java.util.HashMap |
prepareMethod(java.lang.String[] methods)
Declare methods for the interface and save the method-id for later use in the hashmap. |
void |
selectApplet(java.lang.String selectedApplet)
select the given applet and extracts the objId for this applet from card response |
void |
setRmiMethods(java.util.HashMap rmiMethods)
|
void |
setWithEcho(boolean withEcho)
|
void |
setWithResponse(boolean withResponse)
|
void |
startSession()
init the jcshell session Execution of the following commands: - select terminal - select card manager plugin - authenticate - receive info from card (card-info) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String TERM_REMOTE
public static final java.lang.String CMD_ECHO
public static final java.lang.String CMD_TERM
public static final java.lang.String CMD_CARD
public static final java.lang.String CMD_CLOSE
public static final java.lang.String CMD_SEL
public static final java.lang.String CMD_AUTH
public static final java.lang.String CMD_INFO
public static final java.lang.String CMD_METH
public static final java.lang.String CMD_INVOKE
public static final java.lang.String SPACE
public static final java.lang.String METH_NAME_SAMPLE
public static final java.lang.String VAR_METH_PREF
public static final java.lang.String MTH_SAMPLE
| Constructor Detail |
public JCRMIClient(java.io.PrintStream out,
java.lang.String term)
RmiClient tester = null;
PrintStream cout = null;
try {
cout = new PrintStream( new FileOutputStream( "c:/tmp/test_rmi_result.txt" ) );
tester = new RmiClient( cout, RmiClient.TERM_REMOTE );
tester.setWithResponse( true );
tester.setWithEcho( true );
tester.initShell( new String[] {} );
tester.startSession();
tester.selectApplet( tester.getFirstSelectableApplet( JCShell.getLastResponse() ) );
// prepare methods
String[] methods = new String[] { RmiClient.MTH_SAMPLE };
tester.setRmiMethods( tester.prepareMethod( methods ) );
String result = tester.executeMethod( RmiClient.METH_NAME_SAMPLE, "1000" );
cout.println( "Execution result: " + result );
} catch ( JCException e ) {
cout.println( "Error occured during JCShell command processing:\n" );
e.printStackTrace();
} catch ( IOException e ) {
cout.println( "Error occured during JCShell initialization:\n" );
e.printStackTrace();
} finally {
tester.close();
cout.close();
}
out - device for output (default is System.out)term - declare the used card terminalpublic JCRMIClient(java.lang.String term)
term - public JCRMIClient()
| Method Detail |
public java.lang.String executeMethod(java.lang.String methodName,
java.lang.String params)
throws JCException
methodName - params -
JCException
public java.util.HashMap prepareMethod(java.lang.String[] methods)
throws JCException
methods - --> Array where each string describe a method with name and it's signature
JCException
public void selectApplet(java.lang.String selectedApplet)
throws JCException
selectedApplet -
JCException
public void startSession()
throws JCException
JCException
public void initShell(java.lang.String[] args)
throws java.io.IOException
args -
java.io.IOExceptionpublic boolean close()
public java.lang.String getFirstSelectableApplet(java.lang.String lastResponse)
lastResponse -
public java.util.HashMap getRmiMethods()
public void setRmiMethods(java.util.HashMap rmiMethods)
public boolean isWithResponse()
public void setWithResponse(boolean withResponse)
public boolean isWithEcho()
public void setWithEcho(boolean withEcho)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||