|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectds.ov2.test.Misc_protocols_host
class Misc_protocols_host
This class contains the host driver code for the misc protocols, which are ping, set_size, mem_size and status.
| Field Summary | |
|---|---|
private CardChannel |
card_channel
The channel to the card. |
private PrintWriter |
out
Channel for debug and progress messages. |
private Misc_protocols_stubs |
stubs
Card communication stubs. |
private Test_protocols |
test_protocols
The protocol array instance of the host to set the result sizes after the resize protocol. |
| Constructor Summary | |
|---|---|
Misc_protocols_host(Test_protocols test_protocols,
CardChannel card_channel,
PrintWriter out)
Constructor. |
|
| Method Summary | |
|---|---|
Misc_protocols_stubs.Status_result |
get_applet_stat()
Run the status protocol to retrieve the timestamp and the maximal bignat sizes from the applet. |
Misc_protocols_stubs.Mem_size_result |
get_mem_size()
Run the memory-size protocol to obtain the amount of available memory on the card. |
long |
ping()
Ping the test applet. |
void |
report_mem_size()
Run the memory-size protocol and report the results on out. |
void |
run_ping()
Ping the test applet with exception printing. |
void |
set_long_cipher_size(int long_bignat_size,
int cipher_size)
Special resize method for long bignats and RSA_exponent's. |
void |
set_long_size(int long_bignat_size)
Special resize method only for long bignats. |
void |
set_size(int short_bignat_size,
int long_bignat_size,
int double_bignat_size,
int cipher_size)
General resize method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Test_protocols test_protocols
private Misc_protocols_stubs stubs
private CardChannel card_channel
private PrintWriter out
| Constructor Detail |
|---|
public Misc_protocols_host(Test_protocols test_protocols,
CardChannel card_channel,
PrintWriter out)
test_protocols - protocol array instancecard_channel - channel to the appletout - print writer for debug and progress messages| Method Detail |
|---|
public void set_size(int short_bignat_size,
int long_bignat_size,
int double_bignat_size,
int cipher_size)
throws CardException
Resize. Resizes all
registered items in the applet and in the host driver to the
given new sizes. Reinitializes the protocol array as needed
afterwards.
short_bignat_size - new size for registered short bignatslong_bignat_size - new size for registered long bignatsdouble_bignat_size - new size for registered double-sized bignatscipher_size - new size for registered RSA_exponent's, if cipher_size == 0 the underlying RSA ciphers will not be
resized
CardException - on communication errors
public void set_long_cipher_size(int long_bignat_size,
int cipher_size)
throws CardException
RSA_exponent's. Short and
double-sized bignats will be resized to some unspecified valid
value.
long_bignat_size - new size for registered long bignatscipher_size - new size for registered RSA_exponent's, if cipher_size == 0 the underlying RSA ciphers will not be
resized
CardException - on communication errors
public void set_long_size(int long_bignat_size)
throws CardException
RSA_exponent's will
be left as is.
long_bignat_size - new size for registered long bignats
CardException - on communication errors
public Misc_protocols_stubs.Mem_size_result get_mem_size()
throws CardException
CardException - on communication errorspublic void report_mem_size()
out.
public Misc_protocols_stubs.Status_result get_applet_stat()
throws CardException
CardException - on communication errors
public long ping()
throws CardException
CardException - on communication errorspublic void run_ping()
ping().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||